@viamrobotics/sdk 0.35.0 → 0.35.2-b.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/dist/api-version.d.ts +1 -1
- package/dist/components/button/button.d.ts +7 -0
- package/dist/components/button/client.d.ts +19 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/switch/client.d.ts +21 -0
- package/dist/components/switch/switch.d.ts +11 -0
- package/dist/components/switch.d.ts +2 -0
- package/dist/gen/app/v1/app_pb.d.ts +10 -0
- package/dist/gen/app/v1/billing_pb.d.ts +2 -2
- package/dist/gen/app/v1/end_user_connect.d.ts +3 -0
- package/dist/gen/app/v1/end_user_pb.d.ts +6 -0
- package/dist/gen/component/button/v1/button_connect.d.ts +42 -0
- package/dist/gen/component/button/v1/button_pb.d.ts +56 -0
- package/dist/gen/component/switch/v1/switch_connect.d.ts +66 -0
- package/dist/gen/component/switch/v1/switch_pb.d.ts +167 -0
- package/dist/gen/robot/v1/robot_connect.d.ts +14 -1
- package/dist/gen/robot/v1/robot_pb.d.ts +59 -2
- package/dist/main.d.ts +66 -57
- package/dist/main.es.js +9253 -7911
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +28 -12
- package/dist/robot/robot.d.ts +10 -7
- package/dist/services/discovery/client.d.ts +19 -0
- package/dist/services/discovery/client.spec.d.ts +1 -0
- package/dist/services/discovery/discovery.d.ts +13 -0
- package/dist/services/discovery.d.ts +2 -0
- package/package.json +1 -1
package/dist/robot/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type PromiseClient } from '@connectrpc/connect';
|
|
|
3
3
|
import { type Credentials } from '../app/viam-transport';
|
|
4
4
|
import { EventDispatcher } from '../events';
|
|
5
5
|
import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
|
|
6
|
-
import { DiscoveryQuery, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest } from '../gen/robot/v1/robot_pb';
|
|
6
|
+
import { DiscoveryQuery, GetModelsFromModulesRequest, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest } from '../gen/robot/v1/robot_pb';
|
|
7
7
|
import type { Robot } from './robot';
|
|
8
8
|
interface WebRTCOptions {
|
|
9
9
|
enabled: boolean;
|
|
@@ -58,6 +58,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
58
58
|
private inputControllerServiceClient;
|
|
59
59
|
private motorServiceClient;
|
|
60
60
|
private navigationServiceClient;
|
|
61
|
+
private discoveryServiceClient;
|
|
61
62
|
private motionServiceClient;
|
|
62
63
|
private visionServiceClient;
|
|
63
64
|
private servoServiceClient;
|
|
@@ -96,11 +97,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
96
97
|
readonly O: typeof import("../gen/robot/v1/robot_pb").ResourceRPCSubtypesResponse;
|
|
97
98
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
98
99
|
};
|
|
99
|
-
/**
|
|
100
|
-
* A gRPC-web client for a Robot.
|
|
101
|
-
*
|
|
102
|
-
* @group Clients
|
|
103
|
-
*/
|
|
104
100
|
readonly cancelOperation: {
|
|
105
101
|
readonly name: "CancelOperation";
|
|
106
102
|
readonly I: typeof import("../gen/robot/v1/robot_pb").CancelOperationRequest;
|
|
@@ -115,7 +111,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
115
111
|
};
|
|
116
112
|
readonly getModelsFromModules: {
|
|
117
113
|
readonly name: "GetModelsFromModules";
|
|
118
|
-
readonly I: typeof
|
|
114
|
+
readonly I: typeof GetModelsFromModulesRequest;
|
|
119
115
|
readonly O: typeof import("../gen/robot/v1/robot_pb").GetModelsFromModulesResponse;
|
|
120
116
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
121
117
|
};
|
|
@@ -209,6 +205,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
209
205
|
readonly O: typeof import("../gen/robot/v1/robot_pb").GetVersionResponse;
|
|
210
206
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
211
207
|
};
|
|
208
|
+
readonly tunnel: {
|
|
209
|
+
readonly name: "Tunnel";
|
|
210
|
+
readonly I: typeof import("../gen/robot/v1/robot_pb").TunnelRequest;
|
|
211
|
+
readonly O: typeof import("../gen/robot/v1/robot_pb").TunnelResponse;
|
|
212
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.BiDiStreaming;
|
|
213
|
+
};
|
|
212
214
|
};
|
|
213
215
|
}>;
|
|
214
216
|
get armService(): PromiseClient<{
|
|
@@ -237,11 +239,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
237
239
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsRequest;
|
|
238
240
|
readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsResponse;
|
|
239
241
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
240
|
-
};
|
|
241
|
-
* A gRPC-web client for a Robot.
|
|
242
|
-
*
|
|
243
|
-
* @group Clients
|
|
244
|
-
*/
|
|
242
|
+
};
|
|
245
243
|
readonly moveThroughJointPositions: {
|
|
246
244
|
readonly name: "MoveThroughJointPositions";
|
|
247
245
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsRequest;
|
|
@@ -857,6 +855,23 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
857
855
|
};
|
|
858
856
|
};
|
|
859
857
|
}>;
|
|
858
|
+
get discoveryService(): PromiseClient<{
|
|
859
|
+
readonly typeName: "viam.service.discovery.v1.DiscoveryService";
|
|
860
|
+
readonly methods: {
|
|
861
|
+
readonly discoverResources: {
|
|
862
|
+
readonly name: "DiscoverResources";
|
|
863
|
+
readonly I: typeof import("../gen/service/discovery/v1/discovery_pb").DiscoverResourcesRequest;
|
|
864
|
+
readonly O: typeof import("../gen/service/discovery/v1/discovery_pb").DiscoverResourcesResponse;
|
|
865
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
866
|
+
};
|
|
867
|
+
readonly doCommand: {
|
|
868
|
+
readonly name: "DoCommand";
|
|
869
|
+
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
870
|
+
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
|
|
871
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
}>;
|
|
860
875
|
get motionService(): PromiseClient<{
|
|
861
876
|
readonly typeName: "viam.service.motion.v1.MotionService";
|
|
862
877
|
readonly methods: {
|
|
@@ -1053,6 +1068,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1053
1068
|
transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[]): Promise<PoseInFrame>;
|
|
1054
1069
|
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
|
|
1055
1070
|
discoverComponents(queries: DiscoveryQuery[]): Promise<import("../gen/robot/v1/robot_pb").Discovery[]>;
|
|
1071
|
+
getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
|
|
1056
1072
|
getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
|
|
1057
1073
|
resourceNames(): Promise<import("../gen/common/v1/common_pb").ResourceName[]>;
|
|
1058
1074
|
resourceRPCSubtypes(): Promise<import("../gen/robot/v1/robot_pb").ResourceRPCSubtype[]>;
|
package/dist/robot/robot.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { MachineConnectionEvent } from '../events';
|
|
|
3
3
|
import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
|
|
4
4
|
import type proto from '../gen/robot/v1/robot_pb';
|
|
5
5
|
import type { ResourceName } from '../types';
|
|
6
|
+
import type { ModuleModel } from '../gen/robot/v1/robot_pb';
|
|
6
7
|
export type CloudMetadata = proto.GetCloudMetadataResponse;
|
|
7
8
|
type Callback = (args: unknown) => void;
|
|
8
9
|
export interface Robot {
|
|
@@ -84,6 +85,8 @@ export interface Robot {
|
|
|
84
85
|
*/
|
|
85
86
|
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
|
|
86
87
|
/**
|
|
88
|
+
* Deprecated: v0.36.0, use the Discovery Service APIs instead.
|
|
89
|
+
*
|
|
87
90
|
* Get the list of discovered component configurations.
|
|
88
91
|
*
|
|
89
92
|
* @param queries - The list of component models to discovery.
|
|
@@ -91,6 +94,13 @@ export interface Robot {
|
|
|
91
94
|
* @alpha
|
|
92
95
|
*/
|
|
93
96
|
discoverComponents(queries: proto.DiscoveryQuery[]): Promise<proto.Discovery[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Get the list of discovered component configurations.
|
|
99
|
+
*
|
|
100
|
+
* @group ComponentConfig
|
|
101
|
+
* @alpha
|
|
102
|
+
*/
|
|
103
|
+
getModelsFromModules(): Promise<ModuleModel[]>;
|
|
94
104
|
/**
|
|
95
105
|
* Get a list of all resources on the robot.
|
|
96
106
|
*
|
|
@@ -143,12 +153,5 @@ export interface Robot {
|
|
|
143
153
|
* @alpha
|
|
144
154
|
*/
|
|
145
155
|
restartModule(moduleId?: string, moduleName?: string): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Get version information about the robot, such as platform, version, and api
|
|
148
|
-
* version.
|
|
149
|
-
*
|
|
150
|
-
* @alpha
|
|
151
|
-
*/
|
|
152
|
-
getVersion(): Promise<proto.GetVersionResponse>;
|
|
153
156
|
}
|
|
154
157
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Struct, type JsonValue } from '@bufbuild/protobuf';
|
|
2
|
+
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
+
import type { RobotClient } from '../../robot';
|
|
4
|
+
import type { Options } from '../../types';
|
|
5
|
+
import type { Discovery } from './discovery';
|
|
6
|
+
/**
|
|
7
|
+
* A gRPC-web client for a Vision service.
|
|
8
|
+
*
|
|
9
|
+
* @group Clients
|
|
10
|
+
*/
|
|
11
|
+
export declare class DiscoveryClient implements Discovery {
|
|
12
|
+
private client;
|
|
13
|
+
private readonly name;
|
|
14
|
+
private readonly options;
|
|
15
|
+
callOptions: CallOptions;
|
|
16
|
+
constructor(client: RobotClient, name: string, options?: Options);
|
|
17
|
+
discoverResources(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/app/v1/robot_pb").ComponentConfig[]>;
|
|
18
|
+
doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Struct } from '@bufbuild/protobuf';
|
|
2
|
+
import type { Resource } from '../../types';
|
|
3
|
+
import type { ComponentConfig } from '../../gen/app/v1/robot_pb';
|
|
4
|
+
/** A service that enables various computer vision algorithms */
|
|
5
|
+
export interface Discovery extends Resource {
|
|
6
|
+
/**
|
|
7
|
+
* Get a list of component configs of all discovered components.
|
|
8
|
+
*
|
|
9
|
+
* @param discoveryName - The name of the discovery service.
|
|
10
|
+
* @returns - The list of ComponentConfigs.
|
|
11
|
+
*/
|
|
12
|
+
discoverResources: (extra?: Struct) => Promise<ComponentConfig[]>;
|
|
13
|
+
}
|