@aceplus/smartace-api 3.6.0-alpha.5 → 3.6.0-alpha.7
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.asset_pb.d.ts +0 -16
- package/spic.asset_pb.js +34 -154
- package/spic.cabinet_pb.d.ts +0 -344
- package/spic.cabinet_pb.js +1089 -3735
- package/spic.cabinet_pb_service.d.ts +0 -133
- package/spic.cabinet_pb_service.js +0 -280
- package/spic.open_request_pb.d.ts +229 -0
- package/spic.open_request_pb.js +1724 -0
- package/spic.open_request_pb_service.d.ts +101 -0
- package/spic.open_request_pb_service.js +141 -0
|
@@ -5,15 +5,6 @@ import * as spic_cabinet_pb from "./spic.cabinet_pb";
|
|
|
5
5
|
import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
|
|
6
6
|
import {grpc} from "@improbable-eng/grpc-web";
|
|
7
7
|
|
|
8
|
-
type CabinetGRPCCreate = {
|
|
9
|
-
readonly methodName: string;
|
|
10
|
-
readonly service: typeof CabinetGRPC;
|
|
11
|
-
readonly requestStream: false;
|
|
12
|
-
readonly responseStream: false;
|
|
13
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.CreateRequest;
|
|
14
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
8
|
type CabinetGRPCRetrieve = {
|
|
18
9
|
readonly methodName: string;
|
|
19
10
|
readonly service: typeof CabinetGRPC;
|
|
@@ -23,33 +14,6 @@ type CabinetGRPCRetrieve = {
|
|
|
23
14
|
readonly responseType: typeof spic_cabinet_pb.CabinetWithLocation;
|
|
24
15
|
};
|
|
25
16
|
|
|
26
|
-
type CabinetGRPCUpdate = {
|
|
27
|
-
readonly methodName: string;
|
|
28
|
-
readonly service: typeof CabinetGRPC;
|
|
29
|
-
readonly requestStream: false;
|
|
30
|
-
readonly responseStream: false;
|
|
31
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.UpdateRequest;
|
|
32
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type CabinetGRPCDelete = {
|
|
36
|
-
readonly methodName: string;
|
|
37
|
-
readonly service: typeof CabinetGRPC;
|
|
38
|
-
readonly requestStream: false;
|
|
39
|
-
readonly responseStream: false;
|
|
40
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.DeleteRequest;
|
|
41
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto.DeleteReply;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
type CabinetGRPCRetrieveImage = {
|
|
45
|
-
readonly methodName: string;
|
|
46
|
-
readonly service: typeof CabinetGRPC;
|
|
47
|
-
readonly requestStream: false;
|
|
48
|
-
readonly responseStream: false;
|
|
49
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.Image.RetrieveRequest;
|
|
50
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto.Image.RetrieveReply;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
17
|
type CabinetGRPCSearch = {
|
|
54
18
|
readonly methodName: string;
|
|
55
19
|
readonly service: typeof CabinetGRPC;
|
|
@@ -68,15 +32,6 @@ type CabinetGRPCLocationSearch = {
|
|
|
68
32
|
readonly responseType: typeof spic_cabinet_pb.CabinetProto.LocationSearchReply;
|
|
69
33
|
};
|
|
70
34
|
|
|
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
|
-
|
|
80
35
|
type CabinetGRPCSearchStates = {
|
|
81
36
|
readonly methodName: string;
|
|
82
37
|
readonly service: typeof CabinetGRPC;
|
|
@@ -113,40 +68,15 @@ type CabinetGRPCCreateOpenRequest = {
|
|
|
113
68
|
readonly responseType: typeof spic_cabinet_pb.CabinetProto.OpenRequest;
|
|
114
69
|
};
|
|
115
70
|
|
|
116
|
-
type CabinetGRPCSearchOpenRequests = {
|
|
117
|
-
readonly methodName: string;
|
|
118
|
-
readonly service: typeof CabinetGRPC;
|
|
119
|
-
readonly requestStream: false;
|
|
120
|
-
readonly responseStream: false;
|
|
121
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.OpenRequest.SearchRequest;
|
|
122
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto.OpenRequest.SearchReply;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
type CabinetGRPCDeactivateOpenRequest = {
|
|
126
|
-
readonly methodName: string;
|
|
127
|
-
readonly service: typeof CabinetGRPC;
|
|
128
|
-
readonly requestStream: false;
|
|
129
|
-
readonly responseStream: false;
|
|
130
|
-
readonly requestType: typeof spic_cabinet_pb.CabinetProto.OpenRequest.DeactivateRequest;
|
|
131
|
-
readonly responseType: typeof spic_cabinet_pb.CabinetProto.OpenRequest;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
71
|
export class CabinetGRPC {
|
|
135
72
|
static readonly serviceName: string;
|
|
136
|
-
static readonly Create: CabinetGRPCCreate;
|
|
137
73
|
static readonly Retrieve: CabinetGRPCRetrieve;
|
|
138
|
-
static readonly Update: CabinetGRPCUpdate;
|
|
139
|
-
static readonly Delete: CabinetGRPCDelete;
|
|
140
|
-
static readonly RetrieveImage: CabinetGRPCRetrieveImage;
|
|
141
74
|
static readonly Search: CabinetGRPCSearch;
|
|
142
75
|
static readonly LocationSearch: CabinetGRPCLocationSearch;
|
|
143
|
-
static readonly ReplaceBattery: CabinetGRPCReplaceBattery;
|
|
144
76
|
static readonly SearchStates: CabinetGRPCSearchStates;
|
|
145
77
|
static readonly StateExcelReport: CabinetGRPCStateExcelReport;
|
|
146
78
|
static readonly SearchEvents: CabinetGRPCSearchEvents;
|
|
147
79
|
static readonly CreateOpenRequest: CabinetGRPCCreateOpenRequest;
|
|
148
|
-
static readonly SearchOpenRequests: CabinetGRPCSearchOpenRequests;
|
|
149
|
-
static readonly DeactivateOpenRequest: CabinetGRPCDeactivateOpenRequest;
|
|
150
80
|
}
|
|
151
81
|
|
|
152
82
|
type AdminAlertGRPCRetrieveAlerts = {
|
|
@@ -215,15 +145,6 @@ export class CabinetGRPCClient {
|
|
|
215
145
|
readonly serviceHost: string;
|
|
216
146
|
|
|
217
147
|
constructor(serviceHost: string, options?: grpc.RpcOptions);
|
|
218
|
-
create(
|
|
219
|
-
requestMessage: spic_cabinet_pb.CabinetProto.CreateRequest,
|
|
220
|
-
metadata: grpc.Metadata,
|
|
221
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
222
|
-
): UnaryResponse;
|
|
223
|
-
create(
|
|
224
|
-
requestMessage: spic_cabinet_pb.CabinetProto.CreateRequest,
|
|
225
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
226
|
-
): UnaryResponse;
|
|
227
148
|
retrieve(
|
|
228
149
|
requestMessage: spic_cabinet_pb.CabinetProto.RetrieveRequest,
|
|
229
150
|
metadata: grpc.Metadata,
|
|
@@ -233,33 +154,6 @@ export class CabinetGRPCClient {
|
|
|
233
154
|
requestMessage: spic_cabinet_pb.CabinetProto.RetrieveRequest,
|
|
234
155
|
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetWithLocation|null) => void
|
|
235
156
|
): UnaryResponse;
|
|
236
|
-
update(
|
|
237
|
-
requestMessage: spic_cabinet_pb.CabinetProto.UpdateRequest,
|
|
238
|
-
metadata: grpc.Metadata,
|
|
239
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
240
|
-
): UnaryResponse;
|
|
241
|
-
update(
|
|
242
|
-
requestMessage: spic_cabinet_pb.CabinetProto.UpdateRequest,
|
|
243
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
244
|
-
): UnaryResponse;
|
|
245
|
-
delete(
|
|
246
|
-
requestMessage: spic_cabinet_pb.CabinetProto.DeleteRequest,
|
|
247
|
-
metadata: grpc.Metadata,
|
|
248
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.DeleteReply|null) => void
|
|
249
|
-
): UnaryResponse;
|
|
250
|
-
delete(
|
|
251
|
-
requestMessage: spic_cabinet_pb.CabinetProto.DeleteRequest,
|
|
252
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.DeleteReply|null) => void
|
|
253
|
-
): UnaryResponse;
|
|
254
|
-
retrieveImage(
|
|
255
|
-
requestMessage: spic_cabinet_pb.CabinetProto.Image.RetrieveRequest,
|
|
256
|
-
metadata: grpc.Metadata,
|
|
257
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.Image.RetrieveReply|null) => void
|
|
258
|
-
): UnaryResponse;
|
|
259
|
-
retrieveImage(
|
|
260
|
-
requestMessage: spic_cabinet_pb.CabinetProto.Image.RetrieveRequest,
|
|
261
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.Image.RetrieveReply|null) => void
|
|
262
|
-
): UnaryResponse;
|
|
263
157
|
search(
|
|
264
158
|
requestMessage: spic_cabinet_pb.CabinetProto.SearchRequest,
|
|
265
159
|
metadata: grpc.Metadata,
|
|
@@ -278,15 +172,6 @@ export class CabinetGRPCClient {
|
|
|
278
172
|
requestMessage: spic_cabinet_pb.CabinetProto.LocationSearchRequest,
|
|
279
173
|
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.LocationSearchReply|null) => void
|
|
280
174
|
): UnaryResponse;
|
|
281
|
-
replaceBattery(
|
|
282
|
-
requestMessage: spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest,
|
|
283
|
-
metadata: grpc.Metadata,
|
|
284
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
285
|
-
): UnaryResponse;
|
|
286
|
-
replaceBattery(
|
|
287
|
-
requestMessage: spic_cabinet_pb.CabinetProto.ReplaceBatteryRequest,
|
|
288
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto|null) => void
|
|
289
|
-
): UnaryResponse;
|
|
290
175
|
searchStates(
|
|
291
176
|
requestMessage: spic_cabinet_pb.CabinetProto.State.SearchRequest,
|
|
292
177
|
metadata: grpc.Metadata,
|
|
@@ -323,24 +208,6 @@ export class CabinetGRPCClient {
|
|
|
323
208
|
requestMessage: spic_cabinet_pb.CabinetProto.OpenRequest.CreateRequest,
|
|
324
209
|
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.OpenRequest|null) => void
|
|
325
210
|
): UnaryResponse;
|
|
326
|
-
searchOpenRequests(
|
|
327
|
-
requestMessage: spic_cabinet_pb.CabinetProto.OpenRequest.SearchRequest,
|
|
328
|
-
metadata: grpc.Metadata,
|
|
329
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.OpenRequest.SearchReply|null) => void
|
|
330
|
-
): UnaryResponse;
|
|
331
|
-
searchOpenRequests(
|
|
332
|
-
requestMessage: spic_cabinet_pb.CabinetProto.OpenRequest.SearchRequest,
|
|
333
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.OpenRequest.SearchReply|null) => void
|
|
334
|
-
): UnaryResponse;
|
|
335
|
-
deactivateOpenRequest(
|
|
336
|
-
requestMessage: spic_cabinet_pb.CabinetProto.OpenRequest.DeactivateRequest,
|
|
337
|
-
metadata: grpc.Metadata,
|
|
338
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.OpenRequest|null) => void
|
|
339
|
-
): UnaryResponse;
|
|
340
|
-
deactivateOpenRequest(
|
|
341
|
-
requestMessage: spic_cabinet_pb.CabinetProto.OpenRequest.DeactivateRequest,
|
|
342
|
-
callback: (error: ServiceError|null, responseMessage: spic_cabinet_pb.CabinetProto.OpenRequest|null) => void
|
|
343
|
-
): UnaryResponse;
|
|
344
211
|
}
|
|
345
212
|
|
|
346
213
|
export class AdminAlertGRPCClient {
|
|
@@ -11,15 +11,6 @@ var CabinetGRPC = (function () {
|
|
|
11
11
|
return CabinetGRPC;
|
|
12
12
|
}());
|
|
13
13
|
|
|
14
|
-
CabinetGRPC.Create = {
|
|
15
|
-
methodName: "Create",
|
|
16
|
-
service: CabinetGRPC,
|
|
17
|
-
requestStream: false,
|
|
18
|
-
responseStream: false,
|
|
19
|
-
requestType: spic_cabinet_pb.CabinetProto.CreateRequest,
|
|
20
|
-
responseType: spic_cabinet_pb.CabinetProto
|
|
21
|
-
};
|
|
22
|
-
|
|
23
14
|
CabinetGRPC.Retrieve = {
|
|
24
15
|
methodName: "Retrieve",
|
|
25
16
|
service: CabinetGRPC,
|
|
@@ -29,33 +20,6 @@ CabinetGRPC.Retrieve = {
|
|
|
29
20
|
responseType: spic_cabinet_pb.CabinetWithLocation
|
|
30
21
|
};
|
|
31
22
|
|
|
32
|
-
CabinetGRPC.Update = {
|
|
33
|
-
methodName: "Update",
|
|
34
|
-
service: CabinetGRPC,
|
|
35
|
-
requestStream: false,
|
|
36
|
-
responseStream: false,
|
|
37
|
-
requestType: spic_cabinet_pb.CabinetProto.UpdateRequest,
|
|
38
|
-
responseType: spic_cabinet_pb.CabinetProto
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
CabinetGRPC.Delete = {
|
|
42
|
-
methodName: "Delete",
|
|
43
|
-
service: CabinetGRPC,
|
|
44
|
-
requestStream: false,
|
|
45
|
-
responseStream: false,
|
|
46
|
-
requestType: spic_cabinet_pb.CabinetProto.DeleteRequest,
|
|
47
|
-
responseType: spic_cabinet_pb.CabinetProto.DeleteReply
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
CabinetGRPC.RetrieveImage = {
|
|
51
|
-
methodName: "RetrieveImage",
|
|
52
|
-
service: CabinetGRPC,
|
|
53
|
-
requestStream: false,
|
|
54
|
-
responseStream: false,
|
|
55
|
-
requestType: spic_cabinet_pb.CabinetProto.Image.RetrieveRequest,
|
|
56
|
-
responseType: spic_cabinet_pb.CabinetProto.Image.RetrieveReply
|
|
57
|
-
};
|
|
58
|
-
|
|
59
23
|
CabinetGRPC.Search = {
|
|
60
24
|
methodName: "Search",
|
|
61
25
|
service: CabinetGRPC,
|
|
@@ -74,15 +38,6 @@ CabinetGRPC.LocationSearch = {
|
|
|
74
38
|
responseType: spic_cabinet_pb.CabinetProto.LocationSearchReply
|
|
75
39
|
};
|
|
76
40
|
|
|
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
|
-
|
|
86
41
|
CabinetGRPC.SearchStates = {
|
|
87
42
|
methodName: "SearchStates",
|
|
88
43
|
service: CabinetGRPC,
|
|
@@ -119,24 +74,6 @@ CabinetGRPC.CreateOpenRequest = {
|
|
|
119
74
|
responseType: spic_cabinet_pb.CabinetProto.OpenRequest
|
|
120
75
|
};
|
|
121
76
|
|
|
122
|
-
CabinetGRPC.SearchOpenRequests = {
|
|
123
|
-
methodName: "SearchOpenRequests",
|
|
124
|
-
service: CabinetGRPC,
|
|
125
|
-
requestStream: false,
|
|
126
|
-
responseStream: false,
|
|
127
|
-
requestType: spic_cabinet_pb.CabinetProto.OpenRequest.SearchRequest,
|
|
128
|
-
responseType: spic_cabinet_pb.CabinetProto.OpenRequest.SearchReply
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
CabinetGRPC.DeactivateOpenRequest = {
|
|
132
|
-
methodName: "DeactivateOpenRequest",
|
|
133
|
-
service: CabinetGRPC,
|
|
134
|
-
requestStream: false,
|
|
135
|
-
responseStream: false,
|
|
136
|
-
requestType: spic_cabinet_pb.CabinetProto.OpenRequest.DeactivateRequest,
|
|
137
|
-
responseType: spic_cabinet_pb.CabinetProto.OpenRequest
|
|
138
|
-
};
|
|
139
|
-
|
|
140
77
|
exports.CabinetGRPC = CabinetGRPC;
|
|
141
78
|
|
|
142
79
|
function CabinetGRPCClient(serviceHost, options) {
|
|
@@ -144,37 +81,6 @@ function CabinetGRPCClient(serviceHost, options) {
|
|
|
144
81
|
this.options = options || {};
|
|
145
82
|
}
|
|
146
83
|
|
|
147
|
-
CabinetGRPCClient.prototype.create = function create(requestMessage, metadata, callback) {
|
|
148
|
-
if (arguments.length === 2) {
|
|
149
|
-
callback = arguments[1];
|
|
150
|
-
}
|
|
151
|
-
var client = grpc.unary(CabinetGRPC.Create, {
|
|
152
|
-
request: requestMessage,
|
|
153
|
-
host: this.serviceHost,
|
|
154
|
-
metadata: metadata,
|
|
155
|
-
transport: this.options.transport,
|
|
156
|
-
debug: this.options.debug,
|
|
157
|
-
onEnd: function (response) {
|
|
158
|
-
if (callback) {
|
|
159
|
-
if (response.status !== grpc.Code.OK) {
|
|
160
|
-
var err = new Error(response.statusMessage);
|
|
161
|
-
err.code = response.status;
|
|
162
|
-
err.metadata = response.trailers;
|
|
163
|
-
callback(err, null);
|
|
164
|
-
} else {
|
|
165
|
-
callback(null, response.message);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
return {
|
|
171
|
-
cancel: function () {
|
|
172
|
-
callback = null;
|
|
173
|
-
client.close();
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
|
|
178
84
|
CabinetGRPCClient.prototype.retrieve = function retrieve(requestMessage, metadata, callback) {
|
|
179
85
|
if (arguments.length === 2) {
|
|
180
86
|
callback = arguments[1];
|
|
@@ -206,99 +112,6 @@ CabinetGRPCClient.prototype.retrieve = function retrieve(requestMessage, metadat
|
|
|
206
112
|
};
|
|
207
113
|
};
|
|
208
114
|
|
|
209
|
-
CabinetGRPCClient.prototype.update = function update(requestMessage, metadata, callback) {
|
|
210
|
-
if (arguments.length === 2) {
|
|
211
|
-
callback = arguments[1];
|
|
212
|
-
}
|
|
213
|
-
var client = grpc.unary(CabinetGRPC.Update, {
|
|
214
|
-
request: requestMessage,
|
|
215
|
-
host: this.serviceHost,
|
|
216
|
-
metadata: metadata,
|
|
217
|
-
transport: this.options.transport,
|
|
218
|
-
debug: this.options.debug,
|
|
219
|
-
onEnd: function (response) {
|
|
220
|
-
if (callback) {
|
|
221
|
-
if (response.status !== grpc.Code.OK) {
|
|
222
|
-
var err = new Error(response.statusMessage);
|
|
223
|
-
err.code = response.status;
|
|
224
|
-
err.metadata = response.trailers;
|
|
225
|
-
callback(err, null);
|
|
226
|
-
} else {
|
|
227
|
-
callback(null, response.message);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
return {
|
|
233
|
-
cancel: function () {
|
|
234
|
-
callback = null;
|
|
235
|
-
client.close();
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
CabinetGRPCClient.prototype.delete = function pb_delete(requestMessage, metadata, callback) {
|
|
241
|
-
if (arguments.length === 2) {
|
|
242
|
-
callback = arguments[1];
|
|
243
|
-
}
|
|
244
|
-
var client = grpc.unary(CabinetGRPC.Delete, {
|
|
245
|
-
request: requestMessage,
|
|
246
|
-
host: this.serviceHost,
|
|
247
|
-
metadata: metadata,
|
|
248
|
-
transport: this.options.transport,
|
|
249
|
-
debug: this.options.debug,
|
|
250
|
-
onEnd: function (response) {
|
|
251
|
-
if (callback) {
|
|
252
|
-
if (response.status !== grpc.Code.OK) {
|
|
253
|
-
var err = new Error(response.statusMessage);
|
|
254
|
-
err.code = response.status;
|
|
255
|
-
err.metadata = response.trailers;
|
|
256
|
-
callback(err, null);
|
|
257
|
-
} else {
|
|
258
|
-
callback(null, response.message);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
return {
|
|
264
|
-
cancel: function () {
|
|
265
|
-
callback = null;
|
|
266
|
-
client.close();
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
CabinetGRPCClient.prototype.retrieveImage = function retrieveImage(requestMessage, metadata, callback) {
|
|
272
|
-
if (arguments.length === 2) {
|
|
273
|
-
callback = arguments[1];
|
|
274
|
-
}
|
|
275
|
-
var client = grpc.unary(CabinetGRPC.RetrieveImage, {
|
|
276
|
-
request: requestMessage,
|
|
277
|
-
host: this.serviceHost,
|
|
278
|
-
metadata: metadata,
|
|
279
|
-
transport: this.options.transport,
|
|
280
|
-
debug: this.options.debug,
|
|
281
|
-
onEnd: function (response) {
|
|
282
|
-
if (callback) {
|
|
283
|
-
if (response.status !== grpc.Code.OK) {
|
|
284
|
-
var err = new Error(response.statusMessage);
|
|
285
|
-
err.code = response.status;
|
|
286
|
-
err.metadata = response.trailers;
|
|
287
|
-
callback(err, null);
|
|
288
|
-
} else {
|
|
289
|
-
callback(null, response.message);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
return {
|
|
295
|
-
cancel: function () {
|
|
296
|
-
callback = null;
|
|
297
|
-
client.close();
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
};
|
|
301
|
-
|
|
302
115
|
CabinetGRPCClient.prototype.search = function search(requestMessage, metadata, callback) {
|
|
303
116
|
if (arguments.length === 2) {
|
|
304
117
|
callback = arguments[1];
|
|
@@ -361,37 +174,6 @@ CabinetGRPCClient.prototype.locationSearch = function locationSearch(requestMess
|
|
|
361
174
|
};
|
|
362
175
|
};
|
|
363
176
|
|
|
364
|
-
CabinetGRPCClient.prototype.replaceBattery = function replaceBattery(requestMessage, metadata, callback) {
|
|
365
|
-
if (arguments.length === 2) {
|
|
366
|
-
callback = arguments[1];
|
|
367
|
-
}
|
|
368
|
-
var client = grpc.unary(CabinetGRPC.ReplaceBattery, {
|
|
369
|
-
request: requestMessage,
|
|
370
|
-
host: this.serviceHost,
|
|
371
|
-
metadata: metadata,
|
|
372
|
-
transport: this.options.transport,
|
|
373
|
-
debug: this.options.debug,
|
|
374
|
-
onEnd: function (response) {
|
|
375
|
-
if (callback) {
|
|
376
|
-
if (response.status !== grpc.Code.OK) {
|
|
377
|
-
var err = new Error(response.statusMessage);
|
|
378
|
-
err.code = response.status;
|
|
379
|
-
err.metadata = response.trailers;
|
|
380
|
-
callback(err, null);
|
|
381
|
-
} else {
|
|
382
|
-
callback(null, response.message);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
return {
|
|
388
|
-
cancel: function () {
|
|
389
|
-
callback = null;
|
|
390
|
-
client.close();
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
};
|
|
394
|
-
|
|
395
177
|
CabinetGRPCClient.prototype.searchStates = function searchStates(requestMessage, metadata, callback) {
|
|
396
178
|
if (arguments.length === 2) {
|
|
397
179
|
callback = arguments[1];
|
|
@@ -516,68 +298,6 @@ CabinetGRPCClient.prototype.createOpenRequest = function createOpenRequest(reque
|
|
|
516
298
|
};
|
|
517
299
|
};
|
|
518
300
|
|
|
519
|
-
CabinetGRPCClient.prototype.searchOpenRequests = function searchOpenRequests(requestMessage, metadata, callback) {
|
|
520
|
-
if (arguments.length === 2) {
|
|
521
|
-
callback = arguments[1];
|
|
522
|
-
}
|
|
523
|
-
var client = grpc.unary(CabinetGRPC.SearchOpenRequests, {
|
|
524
|
-
request: requestMessage,
|
|
525
|
-
host: this.serviceHost,
|
|
526
|
-
metadata: metadata,
|
|
527
|
-
transport: this.options.transport,
|
|
528
|
-
debug: this.options.debug,
|
|
529
|
-
onEnd: function (response) {
|
|
530
|
-
if (callback) {
|
|
531
|
-
if (response.status !== grpc.Code.OK) {
|
|
532
|
-
var err = new Error(response.statusMessage);
|
|
533
|
-
err.code = response.status;
|
|
534
|
-
err.metadata = response.trailers;
|
|
535
|
-
callback(err, null);
|
|
536
|
-
} else {
|
|
537
|
-
callback(null, response.message);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
return {
|
|
543
|
-
cancel: function () {
|
|
544
|
-
callback = null;
|
|
545
|
-
client.close();
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
};
|
|
549
|
-
|
|
550
|
-
CabinetGRPCClient.prototype.deactivateOpenRequest = function deactivateOpenRequest(requestMessage, metadata, callback) {
|
|
551
|
-
if (arguments.length === 2) {
|
|
552
|
-
callback = arguments[1];
|
|
553
|
-
}
|
|
554
|
-
var client = grpc.unary(CabinetGRPC.DeactivateOpenRequest, {
|
|
555
|
-
request: requestMessage,
|
|
556
|
-
host: this.serviceHost,
|
|
557
|
-
metadata: metadata,
|
|
558
|
-
transport: this.options.transport,
|
|
559
|
-
debug: this.options.debug,
|
|
560
|
-
onEnd: function (response) {
|
|
561
|
-
if (callback) {
|
|
562
|
-
if (response.status !== grpc.Code.OK) {
|
|
563
|
-
var err = new Error(response.statusMessage);
|
|
564
|
-
err.code = response.status;
|
|
565
|
-
err.metadata = response.trailers;
|
|
566
|
-
callback(err, null);
|
|
567
|
-
} else {
|
|
568
|
-
callback(null, response.message);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
});
|
|
573
|
-
return {
|
|
574
|
-
cancel: function () {
|
|
575
|
-
callback = null;
|
|
576
|
-
client.close();
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
};
|
|
580
|
-
|
|
581
301
|
exports.CabinetGRPCClient = CabinetGRPCClient;
|
|
582
302
|
|
|
583
303
|
var AdminAlertGRPC = (function () {
|