@viamrobotics/sdk 0.34.0 → 0.35.1
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/gen/app/data/v1/data_pb.d.ts +5 -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 +86 -0
- package/dist/gen/service/discovery/v1/discovery_connect.d.ts +40 -0
- package/dist/gen/service/discovery/v1/discovery_pb.d.ts +68 -0
- package/dist/main.es.js +3373 -2967
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +28 -6
- package/dist/robot/robot.d.ts +10 -0
- 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;
|
|
@@ -108,6 +109,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
108
109
|
readonly O: typeof import("../gen/robot/v1/robot_pb").BlockForOperationResponse;
|
|
109
110
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
110
111
|
};
|
|
112
|
+
readonly getModelsFromModules: {
|
|
113
|
+
readonly name: "GetModelsFromModules";
|
|
114
|
+
readonly I: typeof GetModelsFromModulesRequest;
|
|
115
|
+
readonly O: typeof import("../gen/robot/v1/robot_pb").GetModelsFromModulesResponse;
|
|
116
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
117
|
+
};
|
|
111
118
|
readonly discoverComponents: {
|
|
112
119
|
readonly name: "DiscoverComponents";
|
|
113
120
|
readonly I: typeof import("../gen/robot/v1/robot_pb").DiscoverComponentsRequest;
|
|
@@ -226,11 +233,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
226
233
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsRequest;
|
|
227
234
|
readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsResponse;
|
|
228
235
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
229
|
-
};
|
|
230
|
-
* A gRPC-web client for a Robot.
|
|
231
|
-
*
|
|
232
|
-
* @group Clients
|
|
233
|
-
*/
|
|
236
|
+
};
|
|
234
237
|
readonly moveThroughJointPositions: {
|
|
235
238
|
readonly name: "MoveThroughJointPositions";
|
|
236
239
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsRequest;
|
|
@@ -846,6 +849,23 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
846
849
|
};
|
|
847
850
|
};
|
|
848
851
|
}>;
|
|
852
|
+
get discoveryService(): PromiseClient<{
|
|
853
|
+
readonly typeName: "viam.service.discovery.v1.DiscoveryService";
|
|
854
|
+
readonly methods: {
|
|
855
|
+
readonly discoverResources: {
|
|
856
|
+
readonly name: "DiscoverResources";
|
|
857
|
+
readonly I: typeof import("../gen/service/discovery/v1/discovery_pb").DiscoverResourcesRequest;
|
|
858
|
+
readonly O: typeof import("../gen/service/discovery/v1/discovery_pb").DiscoverResourcesResponse;
|
|
859
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
860
|
+
};
|
|
861
|
+
readonly doCommand: {
|
|
862
|
+
readonly name: "DoCommand";
|
|
863
|
+
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
864
|
+
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
|
|
865
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
}>;
|
|
849
869
|
get motionService(): PromiseClient<{
|
|
850
870
|
readonly typeName: "viam.service.motion.v1.MotionService";
|
|
851
871
|
readonly methods: {
|
|
@@ -1042,10 +1062,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1042
1062
|
transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[]): Promise<PoseInFrame>;
|
|
1043
1063
|
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
|
|
1044
1064
|
discoverComponents(queries: DiscoveryQuery[]): Promise<import("../gen/robot/v1/robot_pb").Discovery[]>;
|
|
1065
|
+
getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
|
|
1045
1066
|
getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
|
|
1046
1067
|
resourceNames(): Promise<import("../gen/common/v1/common_pb").ResourceName[]>;
|
|
1047
1068
|
resourceRPCSubtypes(): Promise<import("../gen/robot/v1/robot_pb").ResourceRPCSubtype[]>;
|
|
1048
1069
|
getMachineStatus(): Promise<import("../gen/robot/v1/robot_pb").GetMachineStatusResponse>;
|
|
1070
|
+
getVersion(): Promise<import("../gen/robot/v1/robot_pb").GetVersionResponse>;
|
|
1049
1071
|
restartModule(moduleId?: string, moduleName?: string): Promise<void>;
|
|
1050
1072
|
}
|
|
1051
1073
|
export {};
|
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
|
*
|
|
@@ -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
|
+
}
|