@viamrobotics/sdk 0.35.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/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 +2 -0
- package/dist/gen/robot/v1/robot_pb.d.ts +4 -0
- package/dist/main.es.js +1630 -1283
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +22 -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
|
};
|
|
@@ -237,11 +233,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
237
233
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsRequest;
|
|
238
234
|
readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsResponse;
|
|
239
235
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
240
|
-
};
|
|
241
|
-
* A gRPC-web client for a Robot.
|
|
242
|
-
*
|
|
243
|
-
* @group Clients
|
|
244
|
-
*/
|
|
236
|
+
};
|
|
245
237
|
readonly moveThroughJointPositions: {
|
|
246
238
|
readonly name: "MoveThroughJointPositions";
|
|
247
239
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsRequest;
|
|
@@ -857,6 +849,23 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
857
849
|
};
|
|
858
850
|
};
|
|
859
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
|
+
}>;
|
|
860
869
|
get motionService(): PromiseClient<{
|
|
861
870
|
readonly typeName: "viam.service.motion.v1.MotionService";
|
|
862
871
|
readonly methods: {
|
|
@@ -1053,6 +1062,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1053
1062
|
transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[]): Promise<PoseInFrame>;
|
|
1054
1063
|
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
|
|
1055
1064
|
discoverComponents(queries: DiscoveryQuery[]): Promise<import("../gen/robot/v1/robot_pb").Discovery[]>;
|
|
1065
|
+
getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
|
|
1056
1066
|
getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
|
|
1057
1067
|
resourceNames(): Promise<import("../gen/common/v1/common_pb").ResourceName[]>;
|
|
1058
1068
|
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
|
+
}
|