@viamrobotics/sdk 0.7.0-rc.2 → 0.7.1-next.0
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/README.md +2 -0
- package/dist/app/data-client.d.ts +23 -5
- package/dist/app/viam-client.d.ts +12 -6
- package/dist/app/viam-transport.d.ts +17 -0
- package/dist/gen/app/data/v1/data_pb.d.ts +92 -0
- package/dist/gen/app/data/v1/data_pb_service.d.ts +38 -0
- package/dist/gen/app/mltraining/v1/ml_training_pb.d.ts +12 -0
- package/dist/main.d.ts +2 -1
- package/dist/main.es.js +546 -230
- package/dist/main.umd.js +4 -4
- package/dist/robot/dial.d.ts +0 -9
- package/dist/robot/grpc-connection-manager.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -20555,29 +20555,29 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20555
20555
|
case 0:
|
|
20556
20556
|
return D = "", z = function() {
|
|
20557
20557
|
return s.__awaiter(L, void 0, void 0, function() {
|
|
20558
|
-
var I, U, k, S, M,
|
|
20558
|
+
var I, U, k, S, M, B, E, F, P, O;
|
|
20559
20559
|
return s.__generator(this, function(C) {
|
|
20560
20560
|
switch (C.label) {
|
|
20561
20561
|
case 0:
|
|
20562
|
-
return D != "" ? [3, 5] : (I = "", T.accessToken && T.accessToken !== "" ? [3, 2] : ((
|
|
20562
|
+
return D != "" ? [3, 5] : (I = "", T.accessToken && T.accessToken !== "" ? [3, 2] : ((E = new r.AuthenticateRequest()).setEntity(T.authEntity ? T.authEntity : R.replace(/^(.*:\/\/)/, "")), (S = new r.Credentials()).setType((P = T.credentials) === null || P === void 0 ? void 0 : P.type), S.setPayload((O = T.credentials) === null || O === void 0 ? void 0 : O.payload), E.setCredentials(S), B = new Promise(function(A, W) {
|
|
20563
20563
|
U = A, k = W;
|
|
20564
|
-
}), l.grpc.invoke(u.AuthService.Authenticate, { request:
|
|
20564
|
+
}), l.grpc.invoke(u.AuthService.Authenticate, { request: E, host: T.externalAuthAddress ? T.externalAuthAddress : R, transport: w, onMessage: function(A) {
|
|
20565
20565
|
I = A.getAccessToken();
|
|
20566
20566
|
}, onEnd: function(A, W, _) {
|
|
20567
20567
|
A == l.grpc.Code.OK ? U(F) : k(W);
|
|
20568
|
-
} }), [4,
|
|
20568
|
+
} }), [4, B]));
|
|
20569
20569
|
case 1:
|
|
20570
20570
|
return C.sent(), [3, 3];
|
|
20571
20571
|
case 2:
|
|
20572
20572
|
I = T.accessToken, C.label = 3;
|
|
20573
20573
|
case 3:
|
|
20574
|
-
return D = I, T.externalAuthAddress && T.externalAuthToEntity ? ((M = new l.grpc.Metadata()).set("authorization", "Bearer ".concat(D)),
|
|
20574
|
+
return D = I, T.externalAuthAddress && T.externalAuthToEntity ? ((M = new l.grpc.Metadata()).set("authorization", "Bearer ".concat(D)), B = new Promise(function(A, W) {
|
|
20575
20575
|
U = A, k = W;
|
|
20576
|
-
}), I = "", (
|
|
20576
|
+
}), I = "", (E = new r.AuthenticateToRequest()).setEntity(T.externalAuthToEntity), l.grpc.invoke(u.ExternalAuthService.AuthenticateTo, { request: E, host: T.externalAuthAddress, transport: w, metadata: M, onMessage: function(A) {
|
|
20577
20577
|
I = A.getAccessToken();
|
|
20578
20578
|
}, onEnd: function(A, W, _) {
|
|
20579
20579
|
A == l.grpc.Code.OK ? U(M) : k(W);
|
|
20580
|
-
} }), [4,
|
|
20580
|
+
} }), [4, B]) : [3, 5];
|
|
20581
20581
|
case 4:
|
|
20582
20582
|
C.sent(), D = I, C.label = 5;
|
|
20583
20583
|
case 5:
|
|
@@ -20622,9 +20622,9 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20622
20622
|
return z = U.sent(), I = new Promise(function(k, S) {
|
|
20623
20623
|
j = k, L = S;
|
|
20624
20624
|
}), l.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host": w }, host: R, transport: z, onEnd: function(k) {
|
|
20625
|
-
var S = k.status, M = k.statusMessage,
|
|
20626
|
-
if (S === l.grpc.Code.OK &&
|
|
20627
|
-
if (!(x =
|
|
20625
|
+
var S = k.status, M = k.statusMessage, B = k.message;
|
|
20626
|
+
if (S === l.grpc.Code.OK && B) {
|
|
20627
|
+
if (!(x = B.getConfig()))
|
|
20628
20628
|
return void j(new c.WebRTCConfig());
|
|
20629
20629
|
j(x);
|
|
20630
20630
|
} else
|
|
@@ -20666,7 +20666,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20666
20666
|
e.dialWebRTC = function(R, w, T) {
|
|
20667
20667
|
var D, z, j, L, x, I, U, k;
|
|
20668
20668
|
return s.__awaiter(this, void 0, void 0, function() {
|
|
20669
|
-
var S, M,
|
|
20669
|
+
var S, M, B, E, F, P, O, C, A, W, _, G, H, Y, oe, le, re, ge, ae, ie, pe, ne, ce, se, de, ve, ue, me = this;
|
|
20670
20670
|
return s.__generator(this, function(J) {
|
|
20671
20671
|
switch (J.label) {
|
|
20672
20672
|
case 0:
|
|
@@ -20674,9 +20674,9 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20674
20674
|
case 1:
|
|
20675
20675
|
return S = J.sent(), M = S.toObject().additionalIceServersList.map(function(q) {
|
|
20676
20676
|
return { urls: q.urlsList, credential: q.credential, username: q.username };
|
|
20677
|
-
}), T || (T = {}), T.webrtcOptions ? (
|
|
20677
|
+
}), T || (T = {}), T.webrtcOptions ? (B = T.webrtcOptions).rtcConfig ? B.rtcConfig.iceServers = s.__spreadArray(s.__spreadArray([], B.rtcConfig.iceServers || [], !0), M, !0) : B.rtcConfig = { iceServers: M } : B = { disableTrickleICE: S.getDisableTrickle(), rtcConfig: { iceServers: M } }, [4, (0, m.newPeerConnectionForClient)(B !== void 0 && B.disableTrickleICE, B?.rtcConfig, B?.additionalSdpFields)];
|
|
20678
20678
|
case 2:
|
|
20679
|
-
|
|
20679
|
+
E = J.sent(), F = E.pc, P = E.dc, O = !1, J.label = 3;
|
|
20680
20680
|
case 3:
|
|
20681
20681
|
return J.trys.push([3, , 10, 11]), C = T, T && (C = s.__assign({}, T), T.accessToken || (C.authEntity = (D = T?.webrtcOptions) === null || D === void 0 ? void 0 : D.signalingAuthEntity, C.authEntity || (C.externalAuthAddress ? C.authEntity = (z = T.externalAuthAddress) === null || z === void 0 ? void 0 : z.replace(/^(.*:\/\/)/, "") : C.authEntity = R.replace(/^(.*:\/\/)/, "")), C.credentials = (j = T?.webrtcOptions) === null || j === void 0 ? void 0 : j.signalingCredentials, C.accessToken = (L = T?.webrtcOptions) === null || L === void 0 ? void 0 : L.signalingAccessToken), C.externalAuthAddress = (x = T?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingExternalAuthAddress, C.externalAuthToEntity = (I = T?.webrtcOptions) === null || I === void 0 ? void 0 : I.signalingExternalAuthToEntity), [4, v(R, C)];
|
|
20682
20682
|
case 4:
|
|
@@ -20702,7 +20702,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20702
20702
|
}
|
|
20703
20703
|
}, le = new Promise(function(q) {
|
|
20704
20704
|
oe = q;
|
|
20705
|
-
}), re = !1,
|
|
20705
|
+
}), re = !1, B?.disableTrickleICE ? [3, 7] : [4, F.createOffer()];
|
|
20706
20706
|
case 5:
|
|
20707
20707
|
return ge = J.sent(), ae = !1, F.onicecandidate = function(q) {
|
|
20708
20708
|
return s.__awaiter(me, void 0, void 0, function() {
|
|
@@ -20732,7 +20732,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20732
20732
|
case 0:
|
|
20733
20733
|
return (N = q).hasInit() ? ie ? (H("got init stage more than once"), [2]) : ($ = N.getInit(), ie = !0, _ = N.getUuid(), K = new RTCSessionDescription(JSON.parse(atob($.getSdp()))), [4, F.setRemoteDescription(K)]) : [3, 2];
|
|
20734
20734
|
case 1:
|
|
20735
|
-
return ee.sent(), oe(!0),
|
|
20735
|
+
return ee.sent(), oe(!0), B?.disableTrickleICE ? (re = !0, Y(), [2]) : [3, 8];
|
|
20736
20736
|
case 2:
|
|
20737
20737
|
if (!N.hasUpdate())
|
|
20738
20738
|
return [3, 7];
|
|
@@ -20761,7 +20761,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20761
20761
|
pe = q, ne = N;
|
|
20762
20762
|
}), W.onEnd(function(q, N, $) {
|
|
20763
20763
|
q !== l.grpc.Code.OK ? N !== "Response closed without headers" ? (console.error(N), ne(N)) : ne(new p.ConnectionClosedError("failed to dial")) : pe();
|
|
20764
|
-
}), W.start({ "rpc-host": w }), se = new c.CallRequest(), de = (0, m.addSdpFields)(F.localDescription, (U = T.webrtcOptions) === null || U === void 0 ? void 0 : U.additionalSdpFields), ve = btoa(JSON.stringify(de)), se.setSdp(ve),
|
|
20764
|
+
}), W.start({ "rpc-host": w }), se = new c.CallRequest(), de = (0, m.addSdpFields)(F.localDescription, (U = T.webrtcOptions) === null || U === void 0 ? void 0 : U.additionalSdpFields), ve = btoa(JSON.stringify(de)), se.setSdp(ve), B && B.disableTrickleICE && se.setDisableTrickle(B.disableTrickleICE), W.send(se), (ue = new g.ClientChannel(F, P)).ready.then(function() {
|
|
20765
20765
|
return pe();
|
|
20766
20766
|
}).catch(function(q) {
|
|
20767
20767
|
return ne(q);
|
|
@@ -20882,85 +20882,85 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20882
20882
|
}, 655: (i, e, n) => {
|
|
20883
20883
|
n.r(e), n.d(e, { __assign: () => g, __asyncDelegator: () => T, __asyncGenerator: () => w, __asyncValues: () => D, __await: () => R, __awaiter: () => u, __classPrivateFieldGet: () => I, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () => U, __createBinding: () => d, __decorate: () => t, __exportStar: () => m, __extends: () => l, __generator: () => c, __importDefault: () => x, __importStar: () => L, __makeTemplateObject: () => z, __metadata: () => r, __param: () => o, __read: () => f, __rest: () => p, __spread: () => y, __spreadArray: () => h, __spreadArrays: () => b, __values: () => v });
|
|
20884
20884
|
var s = function(S, M) {
|
|
20885
|
-
return s = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
20886
|
-
|
|
20887
|
-
} || function(
|
|
20888
|
-
for (var F in
|
|
20889
|
-
Object.prototype.hasOwnProperty.call(
|
|
20885
|
+
return s = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, E) {
|
|
20886
|
+
B.__proto__ = E;
|
|
20887
|
+
} || function(B, E) {
|
|
20888
|
+
for (var F in E)
|
|
20889
|
+
Object.prototype.hasOwnProperty.call(E, F) && (B[F] = E[F]);
|
|
20890
20890
|
}, s(S, M);
|
|
20891
20891
|
};
|
|
20892
20892
|
function l(S, M) {
|
|
20893
20893
|
if (typeof M != "function" && M !== null)
|
|
20894
20894
|
throw new TypeError("Class extends value " + String(M) + " is not a constructor or null");
|
|
20895
|
-
function
|
|
20895
|
+
function B() {
|
|
20896
20896
|
this.constructor = S;
|
|
20897
20897
|
}
|
|
20898
|
-
s(S, M), S.prototype = M === null ? Object.create(M) : (
|
|
20898
|
+
s(S, M), S.prototype = M === null ? Object.create(M) : (B.prototype = M.prototype, new B());
|
|
20899
20899
|
}
|
|
20900
20900
|
var g = function() {
|
|
20901
20901
|
return g = Object.assign || function(S) {
|
|
20902
|
-
for (var M,
|
|
20903
|
-
for (var F in M = arguments[
|
|
20902
|
+
for (var M, B = 1, E = arguments.length; B < E; B++)
|
|
20903
|
+
for (var F in M = arguments[B])
|
|
20904
20904
|
Object.prototype.hasOwnProperty.call(M, F) && (S[F] = M[F]);
|
|
20905
20905
|
return S;
|
|
20906
20906
|
}, g.apply(this, arguments);
|
|
20907
20907
|
};
|
|
20908
20908
|
function p(S, M) {
|
|
20909
|
-
var
|
|
20910
|
-
for (var
|
|
20911
|
-
Object.prototype.hasOwnProperty.call(S,
|
|
20909
|
+
var B = {};
|
|
20910
|
+
for (var E in S)
|
|
20911
|
+
Object.prototype.hasOwnProperty.call(S, E) && M.indexOf(E) < 0 && (B[E] = S[E]);
|
|
20912
20912
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
20913
20913
|
var F = 0;
|
|
20914
|
-
for (
|
|
20915
|
-
M.indexOf(
|
|
20914
|
+
for (E = Object.getOwnPropertySymbols(S); F < E.length; F++)
|
|
20915
|
+
M.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (B[E[F]] = S[E[F]]);
|
|
20916
20916
|
}
|
|
20917
|
-
return
|
|
20917
|
+
return B;
|
|
20918
20918
|
}
|
|
20919
|
-
function t(S, M,
|
|
20920
|
-
var F, P = arguments.length, O = P < 3 ? M :
|
|
20919
|
+
function t(S, M, B, E) {
|
|
20920
|
+
var F, P = arguments.length, O = P < 3 ? M : E === null ? E = Object.getOwnPropertyDescriptor(M, B) : E;
|
|
20921
20921
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
20922
|
-
O = Reflect.decorate(S, M,
|
|
20922
|
+
O = Reflect.decorate(S, M, B, E);
|
|
20923
20923
|
else
|
|
20924
20924
|
for (var C = S.length - 1; C >= 0; C--)
|
|
20925
|
-
(F = S[C]) && (O = (P < 3 ? F(O) : P > 3 ? F(M,
|
|
20926
|
-
return P > 3 && O && Object.defineProperty(M,
|
|
20925
|
+
(F = S[C]) && (O = (P < 3 ? F(O) : P > 3 ? F(M, B, O) : F(M, B)) || O);
|
|
20926
|
+
return P > 3 && O && Object.defineProperty(M, B, O), O;
|
|
20927
20927
|
}
|
|
20928
20928
|
function o(S, M) {
|
|
20929
|
-
return function(
|
|
20930
|
-
M(
|
|
20929
|
+
return function(B, E) {
|
|
20930
|
+
M(B, E, S);
|
|
20931
20931
|
};
|
|
20932
20932
|
}
|
|
20933
20933
|
function r(S, M) {
|
|
20934
20934
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
20935
20935
|
return Reflect.metadata(S, M);
|
|
20936
20936
|
}
|
|
20937
|
-
function u(S, M,
|
|
20938
|
-
return new (
|
|
20937
|
+
function u(S, M, B, E) {
|
|
20938
|
+
return new (B || (B = Promise))(function(F, P) {
|
|
20939
20939
|
function O(W) {
|
|
20940
20940
|
try {
|
|
20941
|
-
A(
|
|
20941
|
+
A(E.next(W));
|
|
20942
20942
|
} catch (_) {
|
|
20943
20943
|
P(_);
|
|
20944
20944
|
}
|
|
20945
20945
|
}
|
|
20946
20946
|
function C(W) {
|
|
20947
20947
|
try {
|
|
20948
|
-
A(
|
|
20948
|
+
A(E.throw(W));
|
|
20949
20949
|
} catch (_) {
|
|
20950
20950
|
P(_);
|
|
20951
20951
|
}
|
|
20952
20952
|
}
|
|
20953
20953
|
function A(W) {
|
|
20954
20954
|
var _;
|
|
20955
|
-
W.done ? F(W.value) : (_ = W.value, _ instanceof
|
|
20955
|
+
W.done ? F(W.value) : (_ = W.value, _ instanceof B ? _ : new B(function(G) {
|
|
20956
20956
|
G(_);
|
|
20957
20957
|
})).then(O, C);
|
|
20958
20958
|
}
|
|
20959
|
-
A((
|
|
20959
|
+
A((E = E.apply(S, M || [])).next());
|
|
20960
20960
|
});
|
|
20961
20961
|
}
|
|
20962
20962
|
function c(S, M) {
|
|
20963
|
-
var
|
|
20963
|
+
var B, E, F, P, O = { label: 0, sent: function() {
|
|
20964
20964
|
if (1 & F[0])
|
|
20965
20965
|
throw F[1];
|
|
20966
20966
|
return F[1];
|
|
@@ -20971,13 +20971,13 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20971
20971
|
function C(A) {
|
|
20972
20972
|
return function(W) {
|
|
20973
20973
|
return function(_) {
|
|
20974
|
-
if (
|
|
20974
|
+
if (B)
|
|
20975
20975
|
throw new TypeError("Generator is already executing.");
|
|
20976
20976
|
for (; P && (P = 0, _[0] && (O = 0)), O; )
|
|
20977
20977
|
try {
|
|
20978
|
-
if (
|
|
20978
|
+
if (B = 1, E && (F = 2 & _[0] ? E.return : _[0] ? E.throw || ((F = E.return) && F.call(E), 0) : E.next) && !(F = F.call(E, _[1])).done)
|
|
20979
20979
|
return F;
|
|
20980
|
-
switch (
|
|
20980
|
+
switch (E = 0, F && (_ = [2 & _[0], F.value]), _[0]) {
|
|
20981
20981
|
case 0:
|
|
20982
20982
|
case 1:
|
|
20983
20983
|
F = _;
|
|
@@ -20985,7 +20985,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20985
20985
|
case 4:
|
|
20986
20986
|
return O.label++, { value: _[1], done: !1 };
|
|
20987
20987
|
case 5:
|
|
20988
|
-
O.label++,
|
|
20988
|
+
O.label++, E = _[1], _ = [0];
|
|
20989
20989
|
continue;
|
|
20990
20990
|
case 7:
|
|
20991
20991
|
_ = O.ops.pop(), O.trys.pop();
|
|
@@ -21012,9 +21012,9 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
21012
21012
|
}
|
|
21013
21013
|
_ = M.call(S, O);
|
|
21014
21014
|
} catch (G) {
|
|
21015
|
-
_ = [6, G],
|
|
21015
|
+
_ = [6, G], E = 0;
|
|
21016
21016
|
} finally {
|
|
21017
|
-
|
|
21017
|
+
B = F = 0;
|
|
21018
21018
|
}
|
|
21019
21019
|
if (5 & _[0])
|
|
21020
21020
|
throw _[1];
|
|
@@ -21023,42 +21023,42 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
21023
21023
|
};
|
|
21024
21024
|
}
|
|
21025
21025
|
}
|
|
21026
|
-
var d = Object.create ? function(S, M,
|
|
21027
|
-
|
|
21028
|
-
var F = Object.getOwnPropertyDescriptor(M,
|
|
21026
|
+
var d = Object.create ? function(S, M, B, E) {
|
|
21027
|
+
E === void 0 && (E = B);
|
|
21028
|
+
var F = Object.getOwnPropertyDescriptor(M, B);
|
|
21029
21029
|
F && !("get" in F ? !M.__esModule : F.writable || F.configurable) || (F = { enumerable: !0, get: function() {
|
|
21030
|
-
return M[
|
|
21031
|
-
} }), Object.defineProperty(S,
|
|
21032
|
-
} : function(S, M,
|
|
21033
|
-
|
|
21030
|
+
return M[B];
|
|
21031
|
+
} }), Object.defineProperty(S, E, F);
|
|
21032
|
+
} : function(S, M, B, E) {
|
|
21033
|
+
E === void 0 && (E = B), S[E] = M[B];
|
|
21034
21034
|
};
|
|
21035
21035
|
function m(S, M) {
|
|
21036
|
-
for (var
|
|
21037
|
-
|
|
21036
|
+
for (var B in S)
|
|
21037
|
+
B === "default" || Object.prototype.hasOwnProperty.call(M, B) || d(M, S, B);
|
|
21038
21038
|
}
|
|
21039
21039
|
function v(S) {
|
|
21040
|
-
var M = typeof Symbol == "function" && Symbol.iterator,
|
|
21041
|
-
if (
|
|
21042
|
-
return
|
|
21040
|
+
var M = typeof Symbol == "function" && Symbol.iterator, B = M && S[M], E = 0;
|
|
21041
|
+
if (B)
|
|
21042
|
+
return B.call(S);
|
|
21043
21043
|
if (S && typeof S.length == "number")
|
|
21044
21044
|
return { next: function() {
|
|
21045
|
-
return S &&
|
|
21045
|
+
return S && E >= S.length && (S = void 0), { value: S && S[E++], done: !S };
|
|
21046
21046
|
} };
|
|
21047
21047
|
throw new TypeError(M ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
21048
21048
|
}
|
|
21049
21049
|
function f(S, M) {
|
|
21050
|
-
var
|
|
21051
|
-
if (!
|
|
21050
|
+
var B = typeof Symbol == "function" && S[Symbol.iterator];
|
|
21051
|
+
if (!B)
|
|
21052
21052
|
return S;
|
|
21053
|
-
var
|
|
21053
|
+
var E, F, P = B.call(S), O = [];
|
|
21054
21054
|
try {
|
|
21055
|
-
for (; (M === void 0 || M-- > 0) && !(
|
|
21056
|
-
O.push(
|
|
21055
|
+
for (; (M === void 0 || M-- > 0) && !(E = P.next()).done; )
|
|
21056
|
+
O.push(E.value);
|
|
21057
21057
|
} catch (C) {
|
|
21058
21058
|
F = { error: C };
|
|
21059
21059
|
} finally {
|
|
21060
21060
|
try {
|
|
21061
|
-
|
|
21061
|
+
E && !E.done && (B = P.return) && B.call(P);
|
|
21062
21062
|
} finally {
|
|
21063
21063
|
if (F)
|
|
21064
21064
|
throw F.error;
|
|
@@ -21072,32 +21072,32 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
21072
21072
|
return S;
|
|
21073
21073
|
}
|
|
21074
21074
|
function b() {
|
|
21075
|
-
for (var S = 0, M = 0,
|
|
21075
|
+
for (var S = 0, M = 0, B = arguments.length; M < B; M++)
|
|
21076
21076
|
S += arguments[M].length;
|
|
21077
|
-
var
|
|
21078
|
-
for (M = 0; M <
|
|
21077
|
+
var E = Array(S), F = 0;
|
|
21078
|
+
for (M = 0; M < B; M++)
|
|
21079
21079
|
for (var P = arguments[M], O = 0, C = P.length; O < C; O++, F++)
|
|
21080
|
-
|
|
21081
|
-
return
|
|
21080
|
+
E[F] = P[O];
|
|
21081
|
+
return E;
|
|
21082
21082
|
}
|
|
21083
|
-
function h(S, M,
|
|
21084
|
-
if (
|
|
21085
|
-
for (var
|
|
21086
|
-
!
|
|
21087
|
-
return S.concat(
|
|
21083
|
+
function h(S, M, B) {
|
|
21084
|
+
if (B || arguments.length === 2)
|
|
21085
|
+
for (var E, F = 0, P = M.length; F < P; F++)
|
|
21086
|
+
!E && F in M || (E || (E = Array.prototype.slice.call(M, 0, F)), E[F] = M[F]);
|
|
21087
|
+
return S.concat(E || Array.prototype.slice.call(M));
|
|
21088
21088
|
}
|
|
21089
21089
|
function R(S) {
|
|
21090
21090
|
return this instanceof R ? (this.v = S, this) : new R(S);
|
|
21091
21091
|
}
|
|
21092
|
-
function w(S, M,
|
|
21092
|
+
function w(S, M, B) {
|
|
21093
21093
|
if (!Symbol.asyncIterator)
|
|
21094
21094
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21095
|
-
var
|
|
21096
|
-
return
|
|
21095
|
+
var E, F = B.apply(S, M || []), P = [];
|
|
21096
|
+
return E = {}, O("next"), O("throw"), O("return"), E[Symbol.asyncIterator] = function() {
|
|
21097
21097
|
return this;
|
|
21098
|
-
},
|
|
21098
|
+
}, E;
|
|
21099
21099
|
function O(G) {
|
|
21100
|
-
F[G] && (
|
|
21100
|
+
F[G] && (E[G] = function(H) {
|
|
21101
21101
|
return new Promise(function(Y, oe) {
|
|
21102
21102
|
P.push([G, H, Y, oe]) > 1 || C(G, H);
|
|
21103
21103
|
});
|
|
@@ -21122,26 +21122,26 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
21122
21122
|
}
|
|
21123
21123
|
}
|
|
21124
21124
|
function T(S) {
|
|
21125
|
-
var M,
|
|
21126
|
-
return M = {},
|
|
21125
|
+
var M, B;
|
|
21126
|
+
return M = {}, E("next"), E("throw", function(F) {
|
|
21127
21127
|
throw F;
|
|
21128
|
-
}),
|
|
21128
|
+
}), E("return"), M[Symbol.iterator] = function() {
|
|
21129
21129
|
return this;
|
|
21130
21130
|
}, M;
|
|
21131
|
-
function
|
|
21131
|
+
function E(F, P) {
|
|
21132
21132
|
M[F] = S[F] ? function(O) {
|
|
21133
|
-
return (
|
|
21133
|
+
return (B = !B) ? { value: R(S[F](O)), done: F === "return" } : P ? P(O) : O;
|
|
21134
21134
|
} : P;
|
|
21135
21135
|
}
|
|
21136
21136
|
}
|
|
21137
21137
|
function D(S) {
|
|
21138
21138
|
if (!Symbol.asyncIterator)
|
|
21139
21139
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21140
|
-
var M,
|
|
21141
|
-
return
|
|
21140
|
+
var M, B = S[Symbol.asyncIterator];
|
|
21141
|
+
return B ? B.call(S) : (S = v(S), M = {}, E("next"), E("throw"), E("return"), M[Symbol.asyncIterator] = function() {
|
|
21142
21142
|
return this;
|
|
21143
21143
|
}, M);
|
|
21144
|
-
function
|
|
21144
|
+
function E(F) {
|
|
21145
21145
|
M[F] = S[F] && function(P) {
|
|
21146
21146
|
return new Promise(function(O, C) {
|
|
21147
21147
|
(function(A, W, _, G) {
|
|
@@ -21166,28 +21166,28 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
21166
21166
|
return S;
|
|
21167
21167
|
var M = {};
|
|
21168
21168
|
if (S != null)
|
|
21169
|
-
for (var
|
|
21170
|
-
|
|
21169
|
+
for (var B in S)
|
|
21170
|
+
B !== "default" && Object.prototype.hasOwnProperty.call(S, B) && d(M, S, B);
|
|
21171
21171
|
return j(M, S), M;
|
|
21172
21172
|
}
|
|
21173
21173
|
function x(S) {
|
|
21174
21174
|
return S && S.__esModule ? S : { default: S };
|
|
21175
21175
|
}
|
|
21176
|
-
function I(S, M,
|
|
21177
|
-
if (
|
|
21176
|
+
function I(S, M, B, E) {
|
|
21177
|
+
if (B === "a" && !E)
|
|
21178
21178
|
throw new TypeError("Private accessor was defined without a getter");
|
|
21179
|
-
if (typeof M == "function" ? S !== M || !
|
|
21179
|
+
if (typeof M == "function" ? S !== M || !E : !M.has(S))
|
|
21180
21180
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
21181
|
-
return
|
|
21181
|
+
return B === "m" ? E : B === "a" ? E.call(S) : E ? E.value : M.get(S);
|
|
21182
21182
|
}
|
|
21183
|
-
function U(S, M,
|
|
21184
|
-
if (
|
|
21183
|
+
function U(S, M, B, E, F) {
|
|
21184
|
+
if (E === "m")
|
|
21185
21185
|
throw new TypeError("Private method is not writable");
|
|
21186
|
-
if (
|
|
21186
|
+
if (E === "a" && !F)
|
|
21187
21187
|
throw new TypeError("Private accessor was defined without a setter");
|
|
21188
21188
|
if (typeof M == "function" ? S !== M || !F : !M.has(S))
|
|
21189
21189
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
21190
|
-
return
|
|
21190
|
+
return E === "a" ? F.call(S, B) : F ? F.value = B : M.set(S, B), B;
|
|
21191
21191
|
}
|
|
21192
21192
|
function k(S, M) {
|
|
21193
21193
|
if (M === null || typeof M != "object" && typeof M != "function")
|
|
@@ -42308,10 +42308,10 @@ class GRPCConnectionManager {
|
|
|
42308
42308
|
connecting;
|
|
42309
42309
|
connectResolve;
|
|
42310
42310
|
connectReject;
|
|
42311
|
-
constructor(e, n) {
|
|
42311
|
+
constructor(e, n, s = 1e4) {
|
|
42312
42312
|
this.innerTransportFactory = n, this.client = new RobotServiceClient_1(e, {
|
|
42313
42313
|
transport: this.innerTransportFactory
|
|
42314
|
-
});
|
|
42314
|
+
}), this.heartbeatIntervalMs = s;
|
|
42315
42315
|
}
|
|
42316
42316
|
heartbeat() {
|
|
42317
42317
|
let e;
|
|
@@ -42731,6 +42731,77 @@ class RobotClient extends EventDispatcher {
|
|
|
42731
42731
|
}), t;
|
|
42732
42732
|
}
|
|
42733
42733
|
}
|
|
42734
|
+
const isPosInt = (i) => !!(i > 0 && Number.isInteger(i)), isLocalConnection = (i) => i.includes("local"), dialDirect$1 = async (i) => {
|
|
42735
|
+
if (console.debug("dialing via gRPC..."), !isLocalConnection(i.host))
|
|
42736
|
+
throw new Error(
|
|
42737
|
+
`cannot dial "${i.host}" directly, please use a local url instead.`
|
|
42738
|
+
);
|
|
42739
|
+
const e = {
|
|
42740
|
+
noReconnect: i.noReconnect,
|
|
42741
|
+
reconnectMaxWait: i.reconnectMaxWait,
|
|
42742
|
+
reconnectMaxAttempts: i.reconnectMaxAttempts
|
|
42743
|
+
};
|
|
42744
|
+
let n;
|
|
42745
|
+
i.disableSessions && (n = { disabled: !0 });
|
|
42746
|
+
const s = new RobotClient(i.host, void 0, n, e);
|
|
42747
|
+
let l;
|
|
42748
|
+
return i.credential && (l = i.credential), await s.connect({ authEntity: i.authEntity, creds: l }), console.debug("connected via gRPC"), s;
|
|
42749
|
+
}, dialWebRTC = async (i) => {
|
|
42750
|
+
console.debug("dialing via WebRTC...");
|
|
42751
|
+
const e = i.host, { signalingAddress: n } = i, l = { iceServers: i.iceServers ?? [] }, g = {
|
|
42752
|
+
enabled: !0,
|
|
42753
|
+
host: i.host,
|
|
42754
|
+
signalingAddress: n,
|
|
42755
|
+
rtcConfig: l,
|
|
42756
|
+
noReconnect: i.noReconnect,
|
|
42757
|
+
reconnectMaxWait: i.reconnectMaxWait,
|
|
42758
|
+
reconnectMaxAttempts: i.reconnectMaxAttempts
|
|
42759
|
+
};
|
|
42760
|
+
let p;
|
|
42761
|
+
i.disableSessions && (p = { disabled: !0 });
|
|
42762
|
+
const t = new RobotClient(e, g, p);
|
|
42763
|
+
let o;
|
|
42764
|
+
return i.credential && (o = i.credential), await t.connect({
|
|
42765
|
+
authEntity: i.authEntity || e,
|
|
42766
|
+
creds: o,
|
|
42767
|
+
priority: i.priority
|
|
42768
|
+
}), console.debug("connected via WebRTC"), t;
|
|
42769
|
+
}, isDialWebRTCConf = (i) => {
|
|
42770
|
+
const e = i;
|
|
42771
|
+
return typeof e.signalingAddress != "string" ? !1 : !e.iceServers || Array.isArray(e.iceServers);
|
|
42772
|
+
}, createRobotClient = async (i) => {
|
|
42773
|
+
let e;
|
|
42774
|
+
if (i.authEntity)
|
|
42775
|
+
try {
|
|
42776
|
+
i.authEntity = new URL(i.authEntity).host;
|
|
42777
|
+
} catch (n) {
|
|
42778
|
+
if (!(n instanceof TypeError))
|
|
42779
|
+
throw n;
|
|
42780
|
+
}
|
|
42781
|
+
if (i.reconnectMaxAttempts && !isPosInt(i.reconnectMaxAttempts))
|
|
42782
|
+
throw new Error(
|
|
42783
|
+
`Value of max reconnect attempts (${i.reconnectMaxAttempts}) should be a positive integer`
|
|
42784
|
+
);
|
|
42785
|
+
if (i.reconnectMaxWait && !isPosInt(i.reconnectMaxWait))
|
|
42786
|
+
throw new Error(
|
|
42787
|
+
`Value of max reconnect wait (${i.reconnectMaxWait}) should be a positive integer`
|
|
42788
|
+
);
|
|
42789
|
+
if (isDialWebRTCConf(i))
|
|
42790
|
+
try {
|
|
42791
|
+
e = await dialWebRTC(i);
|
|
42792
|
+
} catch {
|
|
42793
|
+
console.debug("failed to connect via WebRTC...");
|
|
42794
|
+
}
|
|
42795
|
+
if (!e)
|
|
42796
|
+
try {
|
|
42797
|
+
e = await dialDirect$1(i);
|
|
42798
|
+
} catch {
|
|
42799
|
+
console.debug("failed to connect via gRPC...");
|
|
42800
|
+
}
|
|
42801
|
+
if (!e)
|
|
42802
|
+
throw new Error("failed to connect to robot");
|
|
42803
|
+
return e;
|
|
42804
|
+
};
|
|
42734
42805
|
var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
42735
42806
|
get exports() {
|
|
42736
42807
|
return grpcWebClient_umdExports;
|
|
@@ -46810,7 +46881,7 @@ SignalingServiceClient.prototype.optionalWebRTCConfig = function i(e, n, s) {
|
|
|
46810
46881
|
}
|
|
46811
46882
|
};
|
|
46812
46883
|
};
|
|
46813
|
-
async function dialDirect
|
|
46884
|
+
async function dialDirect(i, e) {
|
|
46814
46885
|
validateDialOptions(e);
|
|
46815
46886
|
const n = (s) => grpcWebClient_umdExports.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(s);
|
|
46816
46887
|
if (e?.accessToken && !(e?.externalAuthAddress && e?.externalAuthToEntity)) {
|
|
@@ -46930,25 +47001,6 @@ function validateDialOptions(i) {
|
|
|
46930
47001
|
}
|
|
46931
47002
|
}
|
|
46932
47003
|
}
|
|
46933
|
-
class ViamTransport {
|
|
46934
|
-
accessToken;
|
|
46935
|
-
transport;
|
|
46936
|
-
constructor(e, n, s) {
|
|
46937
|
-
this.transport = e(n), this.accessToken = s;
|
|
46938
|
-
}
|
|
46939
|
-
start(e) {
|
|
46940
|
-
e.set("authorization", `Bearer ${this.accessToken}`), this.transport.start(e);
|
|
46941
|
-
}
|
|
46942
|
-
sendMessage(e) {
|
|
46943
|
-
this.transport.sendMessage(e);
|
|
46944
|
-
}
|
|
46945
|
-
finishSend() {
|
|
46946
|
-
this.transport.finishSend();
|
|
46947
|
-
}
|
|
46948
|
-
cancel() {
|
|
46949
|
-
this.transport.cancel();
|
|
46950
|
-
}
|
|
46951
|
-
}
|
|
46952
47004
|
var auth_pb = {};
|
|
46953
47005
|
(function(i) {
|
|
46954
47006
|
var e = googleProtobuf, n = e, s = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof s < "u" && s || typeof self < "u" && self || function() {
|
|
@@ -47297,104 +47349,49 @@ ExternalAuthServiceClient.prototype.authenticateTo = function i(e, n, s) {
|
|
|
47297
47349
|
}
|
|
47298
47350
|
};
|
|
47299
47351
|
};
|
|
47300
|
-
const
|
|
47301
|
-
|
|
47302
|
-
|
|
47303
|
-
|
|
47304
|
-
|
|
47305
|
-
|
|
47306
|
-
|
|
47307
|
-
|
|
47308
|
-
reconnectMaxAttempts: i.reconnectMaxAttempts
|
|
47309
|
-
};
|
|
47310
|
-
let n;
|
|
47311
|
-
i.disableSessions && (n = { disabled: !0 });
|
|
47312
|
-
const s = new RobotClient(i.host, void 0, n, e);
|
|
47313
|
-
let l;
|
|
47314
|
-
return i.credential && (l = i.credential), await s.connect({ authEntity: i.authEntity, creds: l }), console.debug("connected via gRPC"), s;
|
|
47315
|
-
}, dialWebRTC = async (i) => {
|
|
47316
|
-
console.debug("dialing via WebRTC...");
|
|
47317
|
-
const e = i.host, { signalingAddress: n } = i, l = { iceServers: i.iceServers ?? [] }, g = {
|
|
47318
|
-
enabled: !0,
|
|
47319
|
-
host: i.host,
|
|
47320
|
-
signalingAddress: n,
|
|
47321
|
-
rtcConfig: l,
|
|
47322
|
-
noReconnect: i.noReconnect,
|
|
47323
|
-
reconnectMaxWait: i.reconnectMaxWait,
|
|
47324
|
-
reconnectMaxAttempts: i.reconnectMaxAttempts
|
|
47325
|
-
};
|
|
47326
|
-
let p;
|
|
47327
|
-
i.disableSessions && (p = { disabled: !0 });
|
|
47328
|
-
const t = new RobotClient(e, g, p);
|
|
47329
|
-
let o;
|
|
47330
|
-
return i.credential && (o = i.credential), await t.connect({
|
|
47331
|
-
authEntity: i.authEntity || e,
|
|
47332
|
-
creds: o,
|
|
47333
|
-
priority: i.priority
|
|
47334
|
-
}), console.debug("connected via WebRTC"), t;
|
|
47335
|
-
}, isDialWebRTCConf = (i) => {
|
|
47336
|
-
const e = i;
|
|
47337
|
-
return typeof e.signalingAddress != "string" ? !1 : !e.iceServers || Array.isArray(e.iceServers);
|
|
47338
|
-
}, createRobotClient = async (i) => {
|
|
47339
|
-
let e;
|
|
47340
|
-
if (i.authEntity)
|
|
47341
|
-
try {
|
|
47342
|
-
i.authEntity = new URL(i.authEntity).host;
|
|
47343
|
-
} catch (n) {
|
|
47344
|
-
if (!(n instanceof TypeError))
|
|
47345
|
-
throw n;
|
|
47346
|
-
}
|
|
47347
|
-
if (i.reconnectMaxAttempts && !isPosInt(i.reconnectMaxAttempts))
|
|
47352
|
+
const createViamTransportFactory = async (i, e) => e.type === "access-token" ? createWithAccessToken(i, e) : createWithCredential(i, e), createWithAccessToken = async (i, e) => {
|
|
47353
|
+
const n = await dialDirect(i);
|
|
47354
|
+
return (s) => new ViamTransport(n, s, e.payload);
|
|
47355
|
+
}, createWithCredential = async (i, e) => {
|
|
47356
|
+
const n = await dialDirect(i), s = new AuthServiceClient_1(i, {
|
|
47357
|
+
transport: n
|
|
47358
|
+
});
|
|
47359
|
+
if (e.type === "robot-secret")
|
|
47348
47360
|
throw new Error(
|
|
47349
|
-
|
|
47361
|
+
"credential type cannot be 'robot-secret'. Must be either 'robot-location-secret' or 'api-key'."
|
|
47350
47362
|
);
|
|
47351
|
-
if (
|
|
47363
|
+
if (!e.authEntity)
|
|
47352
47364
|
throw new Error(
|
|
47353
|
-
|
|
47354
|
-
);
|
|
47355
|
-
|
|
47356
|
-
|
|
47357
|
-
|
|
47358
|
-
|
|
47359
|
-
|
|
47360
|
-
|
|
47361
|
-
if (!e)
|
|
47362
|
-
try {
|
|
47363
|
-
e = await dialDirect(i);
|
|
47364
|
-
} catch {
|
|
47365
|
-
console.debug("failed to connect via gRPC...");
|
|
47366
|
-
}
|
|
47367
|
-
if (!e)
|
|
47368
|
-
throw new Error("failed to connect to robot");
|
|
47369
|
-
return e;
|
|
47370
|
-
}, createViamTransportFactory = async (i, e) => {
|
|
47371
|
-
if (e.credentials) {
|
|
47372
|
-
if (e.credentials.type === "robot-secret")
|
|
47373
|
-
throw new Error(
|
|
47374
|
-
"credential type cannot be 'robot-secret'. Must be either 'robot-location-secret' or 'api-key'."
|
|
47375
|
-
);
|
|
47376
|
-
if (!e.authEntity)
|
|
47377
|
-
throw new Error(
|
|
47378
|
-
"auth entity cannot be null, undefined, or an empty value."
|
|
47379
|
-
);
|
|
47380
|
-
} else
|
|
47381
|
-
throw new Error("credential cannot be none");
|
|
47382
|
-
const n = e.authEntity, s = new auth_pb.Credentials();
|
|
47383
|
-
s.setType(e.credentials.type), s.setPayload(e.credentials.payload);
|
|
47384
|
-
const l = new auth_pb.AuthenticateRequest();
|
|
47385
|
-
l.setEntity(n), l.setCredentials(s);
|
|
47386
|
-
const g = await dialDirect$1(i), p = new AuthServiceClient_1(i, {
|
|
47387
|
-
transport: g
|
|
47388
|
-
}), t = await new Promise((o, r) => {
|
|
47389
|
-
p.authenticate(l, new grpcWebClient_umdExports$1.grpc.Metadata(), (u, c) => {
|
|
47390
|
-
if (u)
|
|
47391
|
-
return r(u);
|
|
47392
|
-
const d = c?.getAccessToken().toString() ?? "";
|
|
47393
|
-
return o(d);
|
|
47394
|
-
});
|
|
47365
|
+
"auth entity cannot be null, undefined, or an empty value."
|
|
47366
|
+
);
|
|
47367
|
+
const l = e.authEntity, g = new auth_pb.Credentials();
|
|
47368
|
+
g.setType(e.type), g.setPayload(e.payload);
|
|
47369
|
+
const p = new auth_pb.AuthenticateRequest();
|
|
47370
|
+
p.setEntity(l), p.setCredentials(g);
|
|
47371
|
+
const t = await new Promise((o, r) => {
|
|
47372
|
+
s.authenticate(p, new grpcWebClient_umdExports$1.grpc.Metadata(), (u, c) => u ? r(u) : o(c?.getAccessToken().toString() ?? ""));
|
|
47395
47373
|
});
|
|
47396
|
-
return (o) => new ViamTransport(
|
|
47374
|
+
return (o) => new ViamTransport(n, o, t);
|
|
47397
47375
|
};
|
|
47376
|
+
class ViamTransport {
|
|
47377
|
+
accessToken;
|
|
47378
|
+
transport;
|
|
47379
|
+
constructor(e, n, s) {
|
|
47380
|
+
this.transport = e(n), this.accessToken = s;
|
|
47381
|
+
}
|
|
47382
|
+
start(e) {
|
|
47383
|
+
e.set("authorization", `Bearer ${this.accessToken}`), this.transport.start(e);
|
|
47384
|
+
}
|
|
47385
|
+
sendMessage(e) {
|
|
47386
|
+
this.transport.sendMessage(e);
|
|
47387
|
+
}
|
|
47388
|
+
finishSend() {
|
|
47389
|
+
this.transport.finishSend();
|
|
47390
|
+
}
|
|
47391
|
+
cancel() {
|
|
47392
|
+
this.transport.cancel();
|
|
47393
|
+
}
|
|
47394
|
+
}
|
|
47398
47395
|
var data_pb = {};
|
|
47399
47396
|
(function(i) {
|
|
47400
47397
|
var e = googleProtobuf, n = e, s = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof s < "u" && s || typeof self < "u" && self || function() {
|
|
@@ -47404,7 +47401,7 @@ var data_pb = {};
|
|
|
47404
47401
|
var g = struct_pb;
|
|
47405
47402
|
n.object.extend(proto, g);
|
|
47406
47403
|
var p = timestamp_pb;
|
|
47407
|
-
n.object.extend(proto, p), n.exportSymbol("proto.viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBoundingBoxToImageByIDRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBoundingBoxToImageByIDResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Annotations", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryData", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryID", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryMetadata", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBox", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBoxLabelsByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBoxLabelsByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.CaptureInterval", null, s), n.exportSymbol("proto.viam.app.data.v1.CaptureMetadata", null, s), n.exportSymbol("proto.viam.app.data.v1.ConfigureDatabaseUserRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.ConfigureDatabaseUserResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DataRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteTabularDataRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteTabularDataResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Filter", null, s), n.exportSymbol("proto.viam.app.data.v1.GetDatabaseConnectionRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.GetDatabaseConnectionResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Order", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularData", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsFilter", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsFilterType", null, s), proto.viam.app.data.v1.DataRequest = function(t) {
|
|
47404
|
+
n.object.extend(proto, p), n.exportSymbol("proto.viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBoundingBoxToImageByIDRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddBoundingBoxToImageByIDResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.AddTagsToBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Annotations", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryData", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryID", null, s), n.exportSymbol("proto.viam.app.data.v1.BinaryMetadata", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBox", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBoxLabelsByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.BoundingBoxLabelsByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.CaptureInterval", null, s), n.exportSymbol("proto.viam.app.data.v1.CaptureMetadata", null, s), n.exportSymbol("proto.viam.app.data.v1.ConfigureDatabaseUserRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.ConfigureDatabaseUserResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DataRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteTabularDataRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.DeleteTabularDataResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Filter", null, s), n.exportSymbol("proto.viam.app.data.v1.GetDatabaseConnectionRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.GetDatabaseConnectionResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.Order", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularData", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByMQLRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataByMQLResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataBySQLRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TabularDataBySQLResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsByFilterRequest", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsByFilterResponse", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsFilter", null, s), n.exportSymbol("proto.viam.app.data.v1.TagsFilterType", null, s), proto.viam.app.data.v1.DataRequest = function(t) {
|
|
47408
47405
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
47409
47406
|
}, n.inherits(proto.viam.app.data.v1.DataRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.DataRequest.displayName = "proto.viam.app.data.v1.DataRequest"), proto.viam.app.data.v1.Filter = function(t) {
|
|
47410
47407
|
e.Message.initialize(this, t, 0, -1, proto.viam.app.data.v1.Filter.repeatedFields_, null);
|
|
@@ -47420,7 +47417,15 @@ var data_pb = {};
|
|
|
47420
47417
|
e.Message.initialize(this, t, 0, -1, proto.viam.app.data.v1.TabularDataByFilterResponse.repeatedFields_, null);
|
|
47421
47418
|
}, n.inherits(proto.viam.app.data.v1.TabularDataByFilterResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularDataByFilterResponse.displayName = "proto.viam.app.data.v1.TabularDataByFilterResponse"), proto.viam.app.data.v1.TabularData = function(t) {
|
|
47422
47419
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
47423
|
-
}, n.inherits(proto.viam.app.data.v1.TabularData, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularData.displayName = "proto.viam.app.data.v1.TabularData"), proto.viam.app.data.v1.
|
|
47420
|
+
}, n.inherits(proto.viam.app.data.v1.TabularData, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularData.displayName = "proto.viam.app.data.v1.TabularData"), proto.viam.app.data.v1.TabularDataBySQLRequest = function(t) {
|
|
47421
|
+
e.Message.initialize(this, t, 0, -1, null, null);
|
|
47422
|
+
}, n.inherits(proto.viam.app.data.v1.TabularDataBySQLRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularDataBySQLRequest.displayName = "proto.viam.app.data.v1.TabularDataBySQLRequest"), proto.viam.app.data.v1.TabularDataBySQLResponse = function(t) {
|
|
47423
|
+
e.Message.initialize(this, t, 0, -1, proto.viam.app.data.v1.TabularDataBySQLResponse.repeatedFields_, null);
|
|
47424
|
+
}, n.inherits(proto.viam.app.data.v1.TabularDataBySQLResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularDataBySQLResponse.displayName = "proto.viam.app.data.v1.TabularDataBySQLResponse"), proto.viam.app.data.v1.TabularDataByMQLRequest = function(t) {
|
|
47425
|
+
e.Message.initialize(this, t, 0, -1, null, null);
|
|
47426
|
+
}, n.inherits(proto.viam.app.data.v1.TabularDataByMQLRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularDataByMQLRequest.displayName = "proto.viam.app.data.v1.TabularDataByMQLRequest"), proto.viam.app.data.v1.TabularDataByMQLResponse = function(t) {
|
|
47427
|
+
e.Message.initialize(this, t, 0, -1, proto.viam.app.data.v1.TabularDataByMQLResponse.repeatedFields_, null);
|
|
47428
|
+
}, n.inherits(proto.viam.app.data.v1.TabularDataByMQLResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.TabularDataByMQLResponse.displayName = "proto.viam.app.data.v1.TabularDataByMQLResponse"), proto.viam.app.data.v1.BinaryData = function(t) {
|
|
47424
47429
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
47425
47430
|
}, n.inherits(proto.viam.app.data.v1.BinaryData, e.Message), n.DEBUG && !COMPILED && (proto.viam.app.data.v1.BinaryData.displayName = "proto.viam.app.data.v1.BinaryData"), proto.viam.app.data.v1.BinaryDataByFilterRequest = function(t) {
|
|
47426
47431
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
@@ -48581,6 +48586,226 @@ var data_pb = {};
|
|
|
48581
48586
|
return this.setTimeReceived(void 0);
|
|
48582
48587
|
}, proto.viam.app.data.v1.TabularData.prototype.hasTimeReceived = function() {
|
|
48583
48588
|
return e.Message.getField(this, 4) != null;
|
|
48589
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.toObject = function(t) {
|
|
48590
|
+
return proto.viam.app.data.v1.TabularDataBySQLRequest.toObject(t, this);
|
|
48591
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.toObject = function(t, o) {
|
|
48592
|
+
var r = {
|
|
48593
|
+
organizationId: e.Message.getFieldWithDefault(o, 1, ""),
|
|
48594
|
+
sqlQuery: e.Message.getFieldWithDefault(o, 2, "")
|
|
48595
|
+
};
|
|
48596
|
+
return t && (r.$jspbMessageInstance = o), r;
|
|
48597
|
+
}), proto.viam.app.data.v1.TabularDataBySQLRequest.deserializeBinary = function(t) {
|
|
48598
|
+
var o = new e.BinaryReader(t), r = new proto.viam.app.data.v1.TabularDataBySQLRequest();
|
|
48599
|
+
return proto.viam.app.data.v1.TabularDataBySQLRequest.deserializeBinaryFromReader(r, o);
|
|
48600
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.deserializeBinaryFromReader = function(t, o) {
|
|
48601
|
+
for (; o.nextField() && !o.isEndGroup(); ) {
|
|
48602
|
+
var r = o.getFieldNumber();
|
|
48603
|
+
switch (r) {
|
|
48604
|
+
case 1:
|
|
48605
|
+
var u = (
|
|
48606
|
+
/** @type {string} */
|
|
48607
|
+
o.readString()
|
|
48608
|
+
);
|
|
48609
|
+
t.setOrganizationId(u);
|
|
48610
|
+
break;
|
|
48611
|
+
case 2:
|
|
48612
|
+
var u = (
|
|
48613
|
+
/** @type {string} */
|
|
48614
|
+
o.readString()
|
|
48615
|
+
);
|
|
48616
|
+
t.setSqlQuery(u);
|
|
48617
|
+
break;
|
|
48618
|
+
default:
|
|
48619
|
+
o.skipField();
|
|
48620
|
+
break;
|
|
48621
|
+
}
|
|
48622
|
+
}
|
|
48623
|
+
return t;
|
|
48624
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.serializeBinary = function() {
|
|
48625
|
+
var t = new e.BinaryWriter();
|
|
48626
|
+
return proto.viam.app.data.v1.TabularDataBySQLRequest.serializeBinaryToWriter(this, t), t.getResultBuffer();
|
|
48627
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.serializeBinaryToWriter = function(t, o) {
|
|
48628
|
+
var r = void 0;
|
|
48629
|
+
r = t.getOrganizationId(), r.length > 0 && o.writeString(
|
|
48630
|
+
1,
|
|
48631
|
+
r
|
|
48632
|
+
), r = t.getSqlQuery(), r.length > 0 && o.writeString(
|
|
48633
|
+
2,
|
|
48634
|
+
r
|
|
48635
|
+
);
|
|
48636
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.getOrganizationId = function() {
|
|
48637
|
+
return (
|
|
48638
|
+
/** @type {string} */
|
|
48639
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
48640
|
+
);
|
|
48641
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.setOrganizationId = function(t) {
|
|
48642
|
+
return e.Message.setProto3StringField(this, 1, t);
|
|
48643
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.getSqlQuery = function() {
|
|
48644
|
+
return (
|
|
48645
|
+
/** @type {string} */
|
|
48646
|
+
e.Message.getFieldWithDefault(this, 2, "")
|
|
48647
|
+
);
|
|
48648
|
+
}, proto.viam.app.data.v1.TabularDataBySQLRequest.prototype.setSqlQuery = function(t) {
|
|
48649
|
+
return e.Message.setProto3StringField(this, 2, t);
|
|
48650
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.repeatedFields_ = [1], e.Message.GENERATE_TO_OBJECT && (proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.toObject = function(t) {
|
|
48651
|
+
return proto.viam.app.data.v1.TabularDataBySQLResponse.toObject(t, this);
|
|
48652
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.toObject = function(t, o) {
|
|
48653
|
+
var r = {
|
|
48654
|
+
dataList: e.Message.toObjectList(
|
|
48655
|
+
o.getDataList(),
|
|
48656
|
+
g.Struct.toObject,
|
|
48657
|
+
t
|
|
48658
|
+
)
|
|
48659
|
+
};
|
|
48660
|
+
return t && (r.$jspbMessageInstance = o), r;
|
|
48661
|
+
}), proto.viam.app.data.v1.TabularDataBySQLResponse.deserializeBinary = function(t) {
|
|
48662
|
+
var o = new e.BinaryReader(t), r = new proto.viam.app.data.v1.TabularDataBySQLResponse();
|
|
48663
|
+
return proto.viam.app.data.v1.TabularDataBySQLResponse.deserializeBinaryFromReader(r, o);
|
|
48664
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.deserializeBinaryFromReader = function(t, o) {
|
|
48665
|
+
for (; o.nextField() && !o.isEndGroup(); ) {
|
|
48666
|
+
var r = o.getFieldNumber();
|
|
48667
|
+
switch (r) {
|
|
48668
|
+
case 1:
|
|
48669
|
+
var u = new g.Struct();
|
|
48670
|
+
o.readMessage(u, g.Struct.deserializeBinaryFromReader), t.addData(u);
|
|
48671
|
+
break;
|
|
48672
|
+
default:
|
|
48673
|
+
o.skipField();
|
|
48674
|
+
break;
|
|
48675
|
+
}
|
|
48676
|
+
}
|
|
48677
|
+
return t;
|
|
48678
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.serializeBinary = function() {
|
|
48679
|
+
var t = new e.BinaryWriter();
|
|
48680
|
+
return proto.viam.app.data.v1.TabularDataBySQLResponse.serializeBinaryToWriter(this, t), t.getResultBuffer();
|
|
48681
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.serializeBinaryToWriter = function(t, o) {
|
|
48682
|
+
var r = void 0;
|
|
48683
|
+
r = t.getDataList(), r.length > 0 && o.writeRepeatedMessage(
|
|
48684
|
+
1,
|
|
48685
|
+
r,
|
|
48686
|
+
g.Struct.serializeBinaryToWriter
|
|
48687
|
+
);
|
|
48688
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.getDataList = function() {
|
|
48689
|
+
return (
|
|
48690
|
+
/** @type{!Array<!proto.google.protobuf.Struct>} */
|
|
48691
|
+
e.Message.getRepeatedWrapperField(this, g.Struct, 1)
|
|
48692
|
+
);
|
|
48693
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.setDataList = function(t) {
|
|
48694
|
+
return e.Message.setRepeatedWrapperField(this, 1, t);
|
|
48695
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.addData = function(t, o) {
|
|
48696
|
+
return e.Message.addToRepeatedWrapperField(this, 1, t, proto.google.protobuf.Struct, o);
|
|
48697
|
+
}, proto.viam.app.data.v1.TabularDataBySQLResponse.prototype.clearDataList = function() {
|
|
48698
|
+
return this.setDataList([]);
|
|
48699
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.toObject = function(t) {
|
|
48700
|
+
return proto.viam.app.data.v1.TabularDataByMQLRequest.toObject(t, this);
|
|
48701
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.toObject = function(t, o) {
|
|
48702
|
+
var r = {
|
|
48703
|
+
organizationId: e.Message.getFieldWithDefault(o, 1, ""),
|
|
48704
|
+
mqlQuery: e.Message.getFieldWithDefault(o, 2, "")
|
|
48705
|
+
};
|
|
48706
|
+
return t && (r.$jspbMessageInstance = o), r;
|
|
48707
|
+
}), proto.viam.app.data.v1.TabularDataByMQLRequest.deserializeBinary = function(t) {
|
|
48708
|
+
var o = new e.BinaryReader(t), r = new proto.viam.app.data.v1.TabularDataByMQLRequest();
|
|
48709
|
+
return proto.viam.app.data.v1.TabularDataByMQLRequest.deserializeBinaryFromReader(r, o);
|
|
48710
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.deserializeBinaryFromReader = function(t, o) {
|
|
48711
|
+
for (; o.nextField() && !o.isEndGroup(); ) {
|
|
48712
|
+
var r = o.getFieldNumber();
|
|
48713
|
+
switch (r) {
|
|
48714
|
+
case 1:
|
|
48715
|
+
var u = (
|
|
48716
|
+
/** @type {string} */
|
|
48717
|
+
o.readString()
|
|
48718
|
+
);
|
|
48719
|
+
t.setOrganizationId(u);
|
|
48720
|
+
break;
|
|
48721
|
+
case 2:
|
|
48722
|
+
var u = (
|
|
48723
|
+
/** @type {string} */
|
|
48724
|
+
o.readString()
|
|
48725
|
+
);
|
|
48726
|
+
t.setMqlQuery(u);
|
|
48727
|
+
break;
|
|
48728
|
+
default:
|
|
48729
|
+
o.skipField();
|
|
48730
|
+
break;
|
|
48731
|
+
}
|
|
48732
|
+
}
|
|
48733
|
+
return t;
|
|
48734
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.serializeBinary = function() {
|
|
48735
|
+
var t = new e.BinaryWriter();
|
|
48736
|
+
return proto.viam.app.data.v1.TabularDataByMQLRequest.serializeBinaryToWriter(this, t), t.getResultBuffer();
|
|
48737
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.serializeBinaryToWriter = function(t, o) {
|
|
48738
|
+
var r = void 0;
|
|
48739
|
+
r = t.getOrganizationId(), r.length > 0 && o.writeString(
|
|
48740
|
+
1,
|
|
48741
|
+
r
|
|
48742
|
+
), r = t.getMqlQuery(), r.length > 0 && o.writeString(
|
|
48743
|
+
2,
|
|
48744
|
+
r
|
|
48745
|
+
);
|
|
48746
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.getOrganizationId = function() {
|
|
48747
|
+
return (
|
|
48748
|
+
/** @type {string} */
|
|
48749
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
48750
|
+
);
|
|
48751
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.setOrganizationId = function(t) {
|
|
48752
|
+
return e.Message.setProto3StringField(this, 1, t);
|
|
48753
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.getMqlQuery = function() {
|
|
48754
|
+
return (
|
|
48755
|
+
/** @type {string} */
|
|
48756
|
+
e.Message.getFieldWithDefault(this, 2, "")
|
|
48757
|
+
);
|
|
48758
|
+
}, proto.viam.app.data.v1.TabularDataByMQLRequest.prototype.setMqlQuery = function(t) {
|
|
48759
|
+
return e.Message.setProto3StringField(this, 2, t);
|
|
48760
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.repeatedFields_ = [1], e.Message.GENERATE_TO_OBJECT && (proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.toObject = function(t) {
|
|
48761
|
+
return proto.viam.app.data.v1.TabularDataByMQLResponse.toObject(t, this);
|
|
48762
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.toObject = function(t, o) {
|
|
48763
|
+
var r = {
|
|
48764
|
+
dataList: e.Message.toObjectList(
|
|
48765
|
+
o.getDataList(),
|
|
48766
|
+
g.Struct.toObject,
|
|
48767
|
+
t
|
|
48768
|
+
)
|
|
48769
|
+
};
|
|
48770
|
+
return t && (r.$jspbMessageInstance = o), r;
|
|
48771
|
+
}), proto.viam.app.data.v1.TabularDataByMQLResponse.deserializeBinary = function(t) {
|
|
48772
|
+
var o = new e.BinaryReader(t), r = new proto.viam.app.data.v1.TabularDataByMQLResponse();
|
|
48773
|
+
return proto.viam.app.data.v1.TabularDataByMQLResponse.deserializeBinaryFromReader(r, o);
|
|
48774
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.deserializeBinaryFromReader = function(t, o) {
|
|
48775
|
+
for (; o.nextField() && !o.isEndGroup(); ) {
|
|
48776
|
+
var r = o.getFieldNumber();
|
|
48777
|
+
switch (r) {
|
|
48778
|
+
case 1:
|
|
48779
|
+
var u = new g.Struct();
|
|
48780
|
+
o.readMessage(u, g.Struct.deserializeBinaryFromReader), t.addData(u);
|
|
48781
|
+
break;
|
|
48782
|
+
default:
|
|
48783
|
+
o.skipField();
|
|
48784
|
+
break;
|
|
48785
|
+
}
|
|
48786
|
+
}
|
|
48787
|
+
return t;
|
|
48788
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.serializeBinary = function() {
|
|
48789
|
+
var t = new e.BinaryWriter();
|
|
48790
|
+
return proto.viam.app.data.v1.TabularDataByMQLResponse.serializeBinaryToWriter(this, t), t.getResultBuffer();
|
|
48791
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.serializeBinaryToWriter = function(t, o) {
|
|
48792
|
+
var r = void 0;
|
|
48793
|
+
r = t.getDataList(), r.length > 0 && o.writeRepeatedMessage(
|
|
48794
|
+
1,
|
|
48795
|
+
r,
|
|
48796
|
+
g.Struct.serializeBinaryToWriter
|
|
48797
|
+
);
|
|
48798
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.getDataList = function() {
|
|
48799
|
+
return (
|
|
48800
|
+
/** @type{!Array<!proto.google.protobuf.Struct>} */
|
|
48801
|
+
e.Message.getRepeatedWrapperField(this, g.Struct, 1)
|
|
48802
|
+
);
|
|
48803
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.setDataList = function(t) {
|
|
48804
|
+
return e.Message.setRepeatedWrapperField(this, 1, t);
|
|
48805
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.addData = function(t, o) {
|
|
48806
|
+
return e.Message.addToRepeatedWrapperField(this, 1, t, proto.google.protobuf.Struct, o);
|
|
48807
|
+
}, proto.viam.app.data.v1.TabularDataByMQLResponse.prototype.clearDataList = function() {
|
|
48808
|
+
return this.setDataList([]);
|
|
48584
48809
|
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.app.data.v1.BinaryData.prototype.toObject = function(t) {
|
|
48585
48810
|
return proto.viam.app.data.v1.BinaryData.toObject(t, this);
|
|
48586
48811
|
}, proto.viam.app.data.v1.BinaryData.toObject = function(t, o) {
|
|
@@ -50980,6 +51205,22 @@ DataService.TabularDataByFilter = {
|
|
|
50980
51205
|
requestType: app_data_v1_data_pb.TabularDataByFilterRequest,
|
|
50981
51206
|
responseType: app_data_v1_data_pb.TabularDataByFilterResponse
|
|
50982
51207
|
};
|
|
51208
|
+
DataService.TabularDataBySQL = {
|
|
51209
|
+
methodName: "TabularDataBySQL",
|
|
51210
|
+
service: DataService,
|
|
51211
|
+
requestStream: !1,
|
|
51212
|
+
responseStream: !1,
|
|
51213
|
+
requestType: app_data_v1_data_pb.TabularDataBySQLRequest,
|
|
51214
|
+
responseType: app_data_v1_data_pb.TabularDataBySQLResponse
|
|
51215
|
+
};
|
|
51216
|
+
DataService.TabularDataByMQL = {
|
|
51217
|
+
methodName: "TabularDataByMQL",
|
|
51218
|
+
service: DataService,
|
|
51219
|
+
requestStream: !1,
|
|
51220
|
+
responseStream: !1,
|
|
51221
|
+
requestType: app_data_v1_data_pb.TabularDataByMQLRequest,
|
|
51222
|
+
responseType: app_data_v1_data_pb.TabularDataByMQLResponse
|
|
51223
|
+
};
|
|
50983
51224
|
DataService.BinaryDataByFilter = {
|
|
50984
51225
|
methodName: "BinaryDataByFilter",
|
|
50985
51226
|
service: DataService,
|
|
@@ -51142,6 +51383,52 @@ DataServiceClient.prototype.tabularDataByFilter = function i(e, n, s) {
|
|
|
51142
51383
|
}
|
|
51143
51384
|
};
|
|
51144
51385
|
};
|
|
51386
|
+
DataServiceClient.prototype.tabularDataBySQL = function i(e, n, s) {
|
|
51387
|
+
arguments.length === 2 && (s = arguments[1]);
|
|
51388
|
+
var l = grpc$4.unary(DataService.TabularDataBySQL, {
|
|
51389
|
+
request: e,
|
|
51390
|
+
host: this.serviceHost,
|
|
51391
|
+
metadata: n,
|
|
51392
|
+
transport: this.options.transport,
|
|
51393
|
+
debug: this.options.debug,
|
|
51394
|
+
onEnd: function(g) {
|
|
51395
|
+
if (s)
|
|
51396
|
+
if (g.status !== grpc$4.Code.OK) {
|
|
51397
|
+
var p = new Error(g.statusMessage);
|
|
51398
|
+
p.code = g.status, p.metadata = g.trailers, s(p, null);
|
|
51399
|
+
} else
|
|
51400
|
+
s(null, g.message);
|
|
51401
|
+
}
|
|
51402
|
+
});
|
|
51403
|
+
return {
|
|
51404
|
+
cancel: function() {
|
|
51405
|
+
s = null, l.close();
|
|
51406
|
+
}
|
|
51407
|
+
};
|
|
51408
|
+
};
|
|
51409
|
+
DataServiceClient.prototype.tabularDataByMQL = function i(e, n, s) {
|
|
51410
|
+
arguments.length === 2 && (s = arguments[1]);
|
|
51411
|
+
var l = grpc$4.unary(DataService.TabularDataByMQL, {
|
|
51412
|
+
request: e,
|
|
51413
|
+
host: this.serviceHost,
|
|
51414
|
+
metadata: n,
|
|
51415
|
+
transport: this.options.transport,
|
|
51416
|
+
debug: this.options.debug,
|
|
51417
|
+
onEnd: function(g) {
|
|
51418
|
+
if (s)
|
|
51419
|
+
if (g.status !== grpc$4.Code.OK) {
|
|
51420
|
+
var p = new Error(g.statusMessage);
|
|
51421
|
+
p.code = g.status, p.metadata = g.trailers, s(p, null);
|
|
51422
|
+
} else
|
|
51423
|
+
s(null, g.message);
|
|
51424
|
+
}
|
|
51425
|
+
});
|
|
51426
|
+
return {
|
|
51427
|
+
cancel: function() {
|
|
51428
|
+
s = null, l.close();
|
|
51429
|
+
}
|
|
51430
|
+
};
|
|
51431
|
+
};
|
|
51145
51432
|
DataServiceClient.prototype.binaryDataByFilter = function i(e, n, s) {
|
|
51146
51433
|
arguments.length === 2 && (s = arguments[1]);
|
|
51147
51434
|
var l = grpc$4.unary(DataService.BinaryDataByFilter, {
|
|
@@ -51539,6 +51826,28 @@ class DataClient {
|
|
|
51539
51826
|
constructor(e, n) {
|
|
51540
51827
|
this.service = new DataServiceClient_1(e, n);
|
|
51541
51828
|
}
|
|
51829
|
+
/**
|
|
51830
|
+
* Obtain unified tabular data and metadata, queried with SQL.
|
|
51831
|
+
*
|
|
51832
|
+
* @param organizationId The ID of the organization that owns the data
|
|
51833
|
+
* @param query The SQL query to run
|
|
51834
|
+
* @returns An array of data objects
|
|
51835
|
+
*/
|
|
51836
|
+
async tabularDataBySQL(e, n) {
|
|
51837
|
+
const { service: s } = this, l = new data_pb.TabularDataBySQLRequest();
|
|
51838
|
+
return l.setOrganizationId(e), l.setSqlQuery(n), (await promisify(s.tabularDataBySQL.bind(s), l)).getDataList().map((t) => t.toJavaScript());
|
|
51839
|
+
}
|
|
51840
|
+
/**
|
|
51841
|
+
* Obtain unified tabular data and metadata, queried with MQL.
|
|
51842
|
+
*
|
|
51843
|
+
* @param organizationId The ID of the organization that owns the data
|
|
51844
|
+
* @param query The MQL query to run
|
|
51845
|
+
* @returns An array of data objects
|
|
51846
|
+
*/
|
|
51847
|
+
async tabularDataByMQL(e, n) {
|
|
51848
|
+
const { service: s } = this, l = new data_pb.TabularDataByMQLRequest();
|
|
51849
|
+
return l.setOrganizationId(e), l.setMqlQuery(n), (await promisify(s.tabularDataByMQL.bind(s), l)).getDataList().map((t) => t.toJavaScript());
|
|
51850
|
+
}
|
|
51542
51851
|
/**
|
|
51543
51852
|
* Filter and download tabular data. The returned metadata might be empty if
|
|
51544
51853
|
* the metadata index of the data is out of the bounds of the returned
|
|
@@ -51556,7 +51865,7 @@ class DataClient {
|
|
|
51556
51865
|
const p = new data_pb.TabularDataByFilterRequest();
|
|
51557
51866
|
p.setDataRequest(g), p.setCountOnly(!1);
|
|
51558
51867
|
const t = await promisify(n.tabularDataByFilter.bind(n), p), o = t.getDataList();
|
|
51559
|
-
if (
|
|
51868
|
+
if (o.length === 0)
|
|
51560
51869
|
break;
|
|
51561
51870
|
const r = t.getMetadataList().length;
|
|
51562
51871
|
l.push(
|
|
@@ -51582,7 +51891,7 @@ class DataClient {
|
|
|
51582
51891
|
const p = new data_pb.BinaryDataByFilterRequest();
|
|
51583
51892
|
p.setDataRequest(g), p.setCountOnly(!1);
|
|
51584
51893
|
const t = await promisify(n.binaryDataByFilter.bind(n), p), o = t.getDataList();
|
|
51585
|
-
if (
|
|
51894
|
+
if (o.length === 0)
|
|
51586
51895
|
break;
|
|
51587
51896
|
l.push(...o.map((r) => r.toObject())), s = t.getLast();
|
|
51588
51897
|
}
|
|
@@ -51608,17 +51917,24 @@ class DataClient {
|
|
|
51608
51917
|
return e.tags && (s.setTagsList(e.tags), n.setTagsFilter(s)), n;
|
|
51609
51918
|
}
|
|
51610
51919
|
}
|
|
51920
|
+
const createViamClient = async ({
|
|
51921
|
+
serviceHost: i = "https://app.viam.com",
|
|
51922
|
+
credential: e
|
|
51923
|
+
}) => {
|
|
51924
|
+
const n = await createViamTransportFactory(
|
|
51925
|
+
i,
|
|
51926
|
+
e
|
|
51927
|
+
), s = new ViamClient(n, i);
|
|
51928
|
+
return s.connect(), s;
|
|
51929
|
+
};
|
|
51611
51930
|
class ViamClient {
|
|
51612
|
-
serviceHost;
|
|
51613
|
-
dialOpts;
|
|
51614
51931
|
transportFactory;
|
|
51932
|
+
serviceHost;
|
|
51615
51933
|
dataClient;
|
|
51616
51934
|
constructor(e, n) {
|
|
51617
|
-
this.
|
|
51935
|
+
this.transportFactory = e, this.serviceHost = n;
|
|
51618
51936
|
}
|
|
51619
|
-
|
|
51620
|
-
async connect() {
|
|
51621
|
-
this.transportFactory = await this.getTransportFactory();
|
|
51937
|
+
connect() {
|
|
51622
51938
|
const e = { transport: this.transportFactory };
|
|
51623
51939
|
this.dataClient = new DataClient(this.serviceHost, e);
|
|
51624
51940
|
}
|
|
@@ -54805,7 +55121,7 @@ const concatArrayU8 = (i) => {
|
|
|
54805
55121
|
for (const l of i)
|
|
54806
55122
|
n.set(l, s), s += l.length;
|
|
54807
55123
|
return n;
|
|
54808
|
-
}, version = "0.7.
|
|
55124
|
+
}, version = "0.7.1-next.0";
|
|
54809
55125
|
export {
|
|
54810
55126
|
ArmClient,
|
|
54811
55127
|
BaseClient,
|
|
@@ -54828,13 +55144,13 @@ export {
|
|
|
54828
55144
|
ServoClient,
|
|
54829
55145
|
SlamClient,
|
|
54830
55146
|
StreamClient,
|
|
54831
|
-
ViamClient,
|
|
54832
55147
|
arm_pb as armApi,
|
|
54833
55148
|
base_pb as baseApi,
|
|
54834
55149
|
board_pb as boardApi,
|
|
54835
55150
|
camera_pb as cameraApi,
|
|
54836
55151
|
common_pb as commonApi,
|
|
54837
55152
|
createRobotClient,
|
|
55153
|
+
createViamClient,
|
|
54838
55154
|
data_pb as dataApi,
|
|
54839
55155
|
encoder_pb as encoderApi,
|
|
54840
55156
|
gantry_pb as gantryApi,
|