@viamrobotics/sdk 0.38.0 → 0.39.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/app/app-client.d.ts +9 -1
- package/dist/app/billing-client.d.ts +54 -0
- package/dist/app/data-client.d.ts +10 -10
- package/dist/app/ml-training-client.d.ts +94 -0
- package/dist/components/camera/camera.d.ts +51 -2
- package/dist/components/movement-sensor/movement-sensor.d.ts +114 -10
- package/dist/components/power-sensor/power-sensor.d.ts +54 -4
- package/dist/components/sensor/sensor.d.ts +12 -1
- package/dist/gen/app/data/v1/data_pb.d.ts +8 -0
- package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +74 -0
- package/dist/gen/app/datapipelines/v1/data_pipelines_pb.d.ts +378 -0
- package/dist/gen/app/v1/app_pb.d.ts +7 -2
- package/dist/main.es.js +3968 -3723
- package/dist/main.umd.js +7 -7
- package/dist/services/data-manager/client.d.ts +32 -0
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/dist/api-version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const apiVersion = "v0.1.
|
|
1
|
+
export declare const apiVersion = "v0.1.414";
|
package/dist/app/app-client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { JsonValue } from '@bufbuild/protobuf';
|
|
|
2
2
|
import { Struct } from '@bufbuild/protobuf';
|
|
3
3
|
import { type Transport } from '@connectrpc/connect';
|
|
4
4
|
import { PackageType } from '../gen/app/packages/v1/packages_pb';
|
|
5
|
-
import { APIKeyWithAuthorizations, Authorization, AuthorizedPermissions, CreateKeyFromExistingKeyAuthorizationsResponse, CreateKeyResponse, CreateModuleResponse, Fragment, FragmentVisibility, GetRobotPartLogsResponse, GetRobotPartResponse, ListOrganizationMembersResponse, Location, LocationAuth, Model, Module, Organization, OrganizationIdentity, OrganizationInvite, OrgDetails, RegistryItem, RegistryItemStatus, Robot, RobotPart, RobotPartHistoryEntry, RotateKeyResponse, RoverRentalRobot, Visibility } from '../gen/app/v1/app_pb';
|
|
5
|
+
import { APIKeyWithAuthorizations, Authorization, AuthorizedPermissions, CreateKeyFromExistingKeyAuthorizationsResponse, CreateKeyResponse, CreateModuleResponse, Fragment, FragmentVisibility, GetAppContentResponse, GetRobotPartLogsResponse, GetRobotPartResponse, ListOrganizationMembersResponse, Location, LocationAuth, Model, Module, Organization, OrganizationIdentity, OrganizationInvite, OrgDetails, RegistryItem, RegistryItemStatus, Robot, RobotPart, RobotPartHistoryEntry, RotateKeyResponse, RoverRentalRobot, Visibility } from '../gen/app/v1/app_pb';
|
|
6
6
|
import type { LogEntry } from '../gen/common/v1/common_pb';
|
|
7
7
|
/**
|
|
8
8
|
* Creates an Authorization object from auth details.
|
|
@@ -608,6 +608,14 @@ export declare class AppClient {
|
|
|
608
608
|
* @returns The new key and ID
|
|
609
609
|
*/
|
|
610
610
|
createKeyFromExistingKeyAuthorizations(id: string): Promise<CreateKeyFromExistingKeyAuthorizationsResponse>;
|
|
611
|
+
/**
|
|
612
|
+
* Retrieves the app content for an organization.
|
|
613
|
+
*
|
|
614
|
+
* @param publicNamespace The public namespace of the organization
|
|
615
|
+
* @param name The name of the app
|
|
616
|
+
* @returns The blob path and entrypoint of the app content
|
|
617
|
+
*/
|
|
618
|
+
getAppContent(publicNamespace: string, name: string): Promise<GetAppContentResponse>;
|
|
611
619
|
/**
|
|
612
620
|
* Retrieves user-defined metadata for an organization.
|
|
613
621
|
*
|
|
@@ -7,8 +7,62 @@ export type GetCurrentMonthUsageResponse = Partial<PBGetCurrentMonthUsageRespons
|
|
|
7
7
|
export declare class BillingClient {
|
|
8
8
|
private client;
|
|
9
9
|
constructor(transport: Transport);
|
|
10
|
+
/**
|
|
11
|
+
* Get the data usage information for the current month for a given
|
|
12
|
+
* organization.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const usage = await billing.getCurrentMonthUsage('<organization-id>');
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param orgId - The organization ID.
|
|
21
|
+
*/
|
|
10
22
|
getCurrentMonthUsage(orgId: string): Promise<GetCurrentMonthUsageResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the billing information (payment method, billing tier, etc.) for a
|
|
25
|
+
* given org.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* const billingInfo = await billing.getOrgBillingInformation(
|
|
31
|
+
* '<organization-id>'
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param orgId - The organization ID.
|
|
36
|
+
*/
|
|
11
37
|
getOrgBillingInformation(orgId: string): Promise<import("../gen/app/v1/billing_pb").GetOrgBillingInformationResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Get total outstanding balance plus invoice summaries for a given org.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
*
|
|
43
|
+
* ```ts
|
|
44
|
+
* const invoicesSummary = await billing.getInvoicesSummary(
|
|
45
|
+
* '<organization-id>'
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @param orgId - The organization ID.
|
|
50
|
+
*/
|
|
12
51
|
getInvoicesSummary(orgId: string): Promise<import("../gen/app/v1/billing_pb").GetInvoicesSummaryResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Get invoice PDF data.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* const invoicePdf = await billing.getInvoicePdf(
|
|
59
|
+
* '<invoice-id>',
|
|
60
|
+
* '<organization-id>'
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @param id - The invoice ID.
|
|
65
|
+
* @param orgId - The organization ID.
|
|
66
|
+
*/
|
|
13
67
|
getInvoicePdf(id: string, orgId: string): Promise<Uint8Array>;
|
|
14
68
|
}
|
|
@@ -125,12 +125,12 @@ export declare class DataClient {
|
|
|
125
125
|
last: string;
|
|
126
126
|
}>;
|
|
127
127
|
/**
|
|
128
|
-
* Get binary data using the
|
|
128
|
+
* Get binary data using the binary data ID.
|
|
129
129
|
*
|
|
130
130
|
* @param ids The IDs of the requested binary data
|
|
131
131
|
* @returns An array of data objects
|
|
132
132
|
*/
|
|
133
|
-
binaryDataByIds(ids: BinaryID[]): Promise<import("../gen/app/data/v1/data_pb").BinaryData[]>;
|
|
133
|
+
binaryDataByIds(ids: string[] | BinaryID[]): Promise<import("../gen/app/data/v1/data_pb").BinaryData[]>;
|
|
134
134
|
/**
|
|
135
135
|
* Delete tabular data older than a specified number of days.
|
|
136
136
|
*
|
|
@@ -158,7 +158,7 @@ export declare class DataClient {
|
|
|
158
158
|
* @param ids The IDs of the data to be deleted. Must be non-empty.
|
|
159
159
|
* @returns The number of items deleted
|
|
160
160
|
*/
|
|
161
|
-
deleteBinaryDataByIds(ids: BinaryID[]): Promise<bigint>;
|
|
161
|
+
deleteBinaryDataByIds(ids: string[] | BinaryID[]): Promise<bigint>;
|
|
162
162
|
/**
|
|
163
163
|
* Add tags to binary data, specified by ID.
|
|
164
164
|
*
|
|
@@ -166,7 +166,7 @@ export declare class DataClient {
|
|
|
166
166
|
* non-empty.
|
|
167
167
|
* @param ids The IDs of the data to be tagged. Must be non-empty.
|
|
168
168
|
*/
|
|
169
|
-
addTagsToBinaryDataByIds(tags: string[], ids: BinaryID[]): Promise<void>;
|
|
169
|
+
addTagsToBinaryDataByIds(tags: string[], ids: string[] | BinaryID[]): Promise<void>;
|
|
170
170
|
/**
|
|
171
171
|
* Add tags to binary data, specified by filter.
|
|
172
172
|
*
|
|
@@ -183,7 +183,7 @@ export declare class DataClient {
|
|
|
183
183
|
* @param ids The IDs of the data to be edited. Must be non-empty.
|
|
184
184
|
* @returns The number of items deleted
|
|
185
185
|
*/
|
|
186
|
-
removeTagsFromBinaryDataByIds(tags: string[], ids: BinaryID[]): Promise<bigint>;
|
|
186
|
+
removeTagsFromBinaryDataByIds(tags: string[], ids: string[] | BinaryID[]): Promise<bigint>;
|
|
187
187
|
/**
|
|
188
188
|
* Remove tags from binary data, specified by filter.
|
|
189
189
|
*
|
|
@@ -217,14 +217,14 @@ export declare class DataClient {
|
|
|
217
217
|
* to 1
|
|
218
218
|
* @returns The bounding box ID
|
|
219
219
|
*/
|
|
220
|
-
addBoundingBoxToImageById(
|
|
220
|
+
addBoundingBoxToImageById(binaryId: string | BinaryID, label: string, xMinNormalized: number, yMinNormalized: number, xMaxNormalized: number, yMaxNormalized: number): Promise<string>;
|
|
221
221
|
/**
|
|
222
222
|
* Remove a bounding box from an image.
|
|
223
223
|
*
|
|
224
224
|
* @param binId The ID of the image to remove the bounding box from
|
|
225
225
|
* @param bboxId The ID of the bounding box to remove
|
|
226
226
|
*/
|
|
227
|
-
removeBoundingBoxFromImageById(binId: BinaryID, bboxId: string): Promise<void>;
|
|
227
|
+
removeBoundingBoxFromImageById(binId: string | BinaryID, bboxId: string): Promise<void>;
|
|
228
228
|
/**
|
|
229
229
|
* Get a list of bounding box labels using a Filter.
|
|
230
230
|
*
|
|
@@ -255,14 +255,14 @@ export declare class DataClient {
|
|
|
255
255
|
* @param ids The IDs of binary data to add to dataset
|
|
256
256
|
* @param datasetId The ID of the dataset to be added to
|
|
257
257
|
*/
|
|
258
|
-
addBinaryDataToDatasetByIds(ids: BinaryID[], datasetId: string): Promise<void>;
|
|
258
|
+
addBinaryDataToDatasetByIds(ids: string[] | BinaryID[], datasetId: string): Promise<void>;
|
|
259
259
|
/**
|
|
260
260
|
* Remove BinaryData from the provided dataset.
|
|
261
261
|
*
|
|
262
262
|
* @param ids The IDs of the binary data to remove from dataset
|
|
263
263
|
* @param datasetId The ID of the dataset to be removed from
|
|
264
264
|
*/
|
|
265
|
-
removeBinaryDataFromDatasetByIds(ids: BinaryID[], datasetId: string): Promise<void>;
|
|
265
|
+
removeBinaryDataFromDatasetByIds(ids: string[] | BinaryID[], datasetId: string): Promise<void>;
|
|
266
266
|
/**
|
|
267
267
|
* Create a new dataset.
|
|
268
268
|
*
|
|
@@ -346,7 +346,7 @@ export declare class DataClient {
|
|
|
346
346
|
* @param dataRequestTimes Tuple containing `Date` objects denoting the times
|
|
347
347
|
* this data was requested[0] by the robot and received[1] from the
|
|
348
348
|
* appropriate sensor.
|
|
349
|
-
* @returns The
|
|
349
|
+
* @returns The binary data ID of the uploaded data
|
|
350
350
|
*/
|
|
351
351
|
binaryDataCaptureUpload(binaryData: Uint8Array, partId: string, componentType: string, componentName: string, methodName: string, fileExtension: string, dataRequestTimes: [Date, Date], tags?: string[]): Promise<string>;
|
|
352
352
|
createFilter(options: FilterOptions): Filter;
|
|
@@ -3,11 +3,105 @@ import { ModelType, TrainingStatus } from '../gen/app/mltraining/v1/ml_training_
|
|
|
3
3
|
export declare class MlTrainingClient {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(transport: Transport);
|
|
6
|
+
/**
|
|
7
|
+
* Submit a training job.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* await mlTrainingClient.submitTrainingJob(
|
|
13
|
+
* '<organization-id>',
|
|
14
|
+
* '<dataset-id>',
|
|
15
|
+
* '<your-model-name>',
|
|
16
|
+
* '1.0.0',
|
|
17
|
+
* ModelType.SINGLE_LABEL_CLASSIFICATION,
|
|
18
|
+
* ['tag1', 'tag2']
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param organizationId - The organization ID.
|
|
23
|
+
* @param datasetId - The dataset ID.
|
|
24
|
+
* @param modelName - The model name.
|
|
25
|
+
* @param modelVersion - The model version.
|
|
26
|
+
* @param modelType - The model type.
|
|
27
|
+
* @param tags - The tags.
|
|
28
|
+
*/
|
|
6
29
|
submitTrainingJob(organizationId: string, datasetId: string, modelName: string, modelVersion: string, modelType: ModelType, tags: string[]): Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Submit a training job from a custom training script.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* await mlTrainingClient.submitCustomTrainingJob(
|
|
37
|
+
* '<organization-id>',
|
|
38
|
+
* '<dataset-id>',
|
|
39
|
+
* 'viam:classification-tflite',
|
|
40
|
+
* '1.0.0',
|
|
41
|
+
* '<your-model-name>',
|
|
42
|
+
* '1.0.0'
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @param organizationId - The organization ID.
|
|
47
|
+
* @param datasetId - The dataset ID.
|
|
48
|
+
* @param registryItemId - The registry item ID.
|
|
49
|
+
* @param registryItemVersion - The registry item version.
|
|
50
|
+
* @param modelName - The model name.
|
|
51
|
+
* @param modelVersion - The model version.
|
|
52
|
+
*/
|
|
7
53
|
submitCustomTrainingJob(organizationId: string, datasetId: string, registryItemId: string, registryItemVersion: string, modelName: string, modelVersion: string): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Get a training job metadata.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* const job = await mlTrainingClient.getTrainingJob('<training-job-id>');
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param id - The training job ID.
|
|
64
|
+
*/
|
|
8
65
|
getTrainingJob(id: string): Promise<import("../gen/app/mltraining/v1/ml_training_pb").TrainingJobMetadata | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* List training jobs.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* const jobs = await mlTrainingClient.listTrainingJobs(
|
|
73
|
+
* '<organization-id>',
|
|
74
|
+
* TrainingStatus.RUNNING
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param organizationId - The organization ID.
|
|
79
|
+
* @param status - The training job status.
|
|
80
|
+
*/
|
|
9
81
|
listTrainingJobs(organizationId: string, status: TrainingStatus): Promise<import("../gen/app/mltraining/v1/ml_training_pb").TrainingJobMetadata[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Cancel a training job.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* await mlTrainingClient.cancelTrainingJob('<training-job-id>');
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @param id - The training job ID.
|
|
92
|
+
*/
|
|
10
93
|
cancelTrainingJob(id: string): Promise<null>;
|
|
94
|
+
/**
|
|
95
|
+
* Delete a completed training job.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* await mlTrainingClient.deleteCompletedTrainingJob('<training-job-id>');
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @param id - The training job ID.
|
|
104
|
+
*/
|
|
11
105
|
deleteCompletedTrainingJob(id: string): Promise<null>;
|
|
12
106
|
}
|
|
13
107
|
export { ModelType, TrainingStatus, } from '../gen/app/mltraining/v1/ml_training_pb';
|
|
@@ -20,6 +20,29 @@ export interface Camera extends Resource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Return a frame from a camera.
|
|
22
22
|
*
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
27
|
+
* const image = await camera.getImage();
|
|
28
|
+
*
|
|
29
|
+
* // Convert Uint8Array to base64
|
|
30
|
+
* const base64Image = btoa(
|
|
31
|
+
* Array.from(image)
|
|
32
|
+
* .map((byte) => String.fromCharCode(byte))
|
|
33
|
+
* .join('')
|
|
34
|
+
* );
|
|
35
|
+
*
|
|
36
|
+
* // Convert image to base64 and display it
|
|
37
|
+
* const imageElement = document.createElement('img');
|
|
38
|
+
* imageElement.src = `data:image/jpeg;base64,${base64Image}`;
|
|
39
|
+
* const imageContainer = document.getElementById('#imageContainer');
|
|
40
|
+
* if (imageContainer) {
|
|
41
|
+
* imageContainer.innerHTML = '';
|
|
42
|
+
* imageContainer.appendChild(imageElement);
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
23
46
|
* @param mimeType - A specific MIME type to request. This is not necessarily
|
|
24
47
|
* the same type that will be returned.
|
|
25
48
|
*/
|
|
@@ -27,12 +50,38 @@ export interface Camera extends Resource {
|
|
|
27
50
|
/**
|
|
28
51
|
* Render a frame from a camera to an HTTP response.
|
|
29
52
|
*
|
|
53
|
+
* @example
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
57
|
+
* const mimeType = 'image/jpeg';
|
|
58
|
+
* const image = await camera.renderFrame(mimeType);
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
30
61
|
* @param mimeType - A specific MIME type to request. This is not necessarily
|
|
31
62
|
* the same type that will be returned.
|
|
32
63
|
*/
|
|
33
64
|
renderFrame: (mimeType?: MimeType, extra?: Struct) => Promise<Blob>;
|
|
34
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Return a point cloud from a camera.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
72
|
+
* const pointCloud = await camera.getPointCloud();
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
35
75
|
getPointCloud: (extra?: Struct) => Promise<Uint8Array>;
|
|
36
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Return the camera properties.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
83
|
+
* const properties = await camera.getProperties();
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
37
86
|
getProperties: () => Promise<Properties>;
|
|
38
87
|
}
|
|
@@ -10,28 +10,132 @@ export declare const MovementSensorAccuracy: typeof sensorApi.GetAccuracyRespons
|
|
|
10
10
|
* position, and/or speed.
|
|
11
11
|
*/
|
|
12
12
|
export interface MovementSensor extends Resource {
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Get linear velocity across x/y/z axes.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
20
|
+
* machine,
|
|
21
|
+
* 'my_movement_sensor'
|
|
22
|
+
* );
|
|
23
|
+
* const linearVelocity = await movementSensor.getLinearVelocity();
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
14
26
|
getLinearVelocity(extra?: Struct): Promise<Vector3>;
|
|
15
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Get the angular velocity across x/y/z axes.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
34
|
+
* machine,
|
|
35
|
+
* 'my_movement_sensor'
|
|
36
|
+
* );
|
|
37
|
+
* const angularVelocity = await movementSensor.getAngularVelocity();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
16
40
|
getAngularVelocity(extra?: Struct): Promise<Vector3>;
|
|
17
41
|
/**
|
|
18
42
|
* Get the compass heading, which is a number from 0-359 where 0 is North, 90
|
|
19
|
-
* is East, 180 is South, and 270 is West
|
|
43
|
+
* is East, 180 is South, and 270 is West.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
49
|
+
* machine,
|
|
50
|
+
* 'my_movement_sensor'
|
|
51
|
+
* );
|
|
52
|
+
* const compassHeading = await movementSensor.getCompassHeading();
|
|
53
|
+
* ```
|
|
20
54
|
*/
|
|
21
55
|
getCompassHeading(extra?: Struct): Promise<number>;
|
|
22
56
|
/**
|
|
23
|
-
* Get the
|
|
24
|
-
*
|
|
57
|
+
* Get the current orientation of the sensor.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
63
|
+
* machine,
|
|
64
|
+
* 'my_movement_sensor'
|
|
65
|
+
* );
|
|
66
|
+
* const orientation = await movementSensor.getOrientation();
|
|
67
|
+
* ```
|
|
25
68
|
*/
|
|
26
69
|
getOrientation(extra?: Struct): Promise<Orientation>;
|
|
27
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Get the current position latitude, longitude, and altitude.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
*
|
|
75
|
+
* ```ts
|
|
76
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
77
|
+
* machine,
|
|
78
|
+
* 'my_movement_sensor'
|
|
79
|
+
* );
|
|
80
|
+
* const position = await movementSensor.getPosition();
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
28
83
|
getPosition(extra?: Struct): Promise<MovementSensorPosition>;
|
|
29
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Get the properties of this movement sensor.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
*
|
|
89
|
+
* ```ts
|
|
90
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
91
|
+
* machine,
|
|
92
|
+
* 'my_movement_sensor'
|
|
93
|
+
* );
|
|
94
|
+
* const properties = await movementSensor.getProperties();
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
30
97
|
getProperties(extra?: Struct): Promise<MovementSensorProperties>;
|
|
31
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Get the accuracy of various sensors.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
*
|
|
103
|
+
* ```ts
|
|
104
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
105
|
+
* machine,
|
|
106
|
+
* 'my_movement_sensor'
|
|
107
|
+
* );
|
|
108
|
+
* const accuracy = await movementSensor.getAccuracy();
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
32
111
|
getAccuracy(extra?: Struct): Promise<MovementSensorAccuracy>;
|
|
33
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Get linear acceleration across x/y/z axes.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
*
|
|
117
|
+
* ```ts
|
|
118
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
119
|
+
* machine,
|
|
120
|
+
* 'my_movement_sensor'
|
|
121
|
+
* );
|
|
122
|
+
* const linearAcceleration =
|
|
123
|
+
* await movementSensor.getLinearAcceleration();
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
34
126
|
getLinearAcceleration(extra?: Struct): Promise<Vector3>;
|
|
35
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Return the readings of a sensor.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
*
|
|
132
|
+
* ```ts
|
|
133
|
+
* const movementSensor = new VIAM.MovementSensorClient(
|
|
134
|
+
* machine,
|
|
135
|
+
* 'my_movement_sensor'
|
|
136
|
+
* );
|
|
137
|
+
* const readings = await movementSensor.getReadings();
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
36
140
|
getReadings(extra?: Struct): Promise<Record<string, JsonValue>>;
|
|
37
141
|
}
|
|
@@ -2,12 +2,62 @@ import type { JsonValue, Struct } from '@bufbuild/protobuf';
|
|
|
2
2
|
import type { Sensor } from '../sensor';
|
|
3
3
|
/** Represents any sensor that reports voltage, current, and/or power */
|
|
4
4
|
export interface PowerSensor extends Sensor {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Get voltage in volts and a boolean indicating whether the voltage is AC
|
|
7
|
+
* (true) or DC (false).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* const powerSensor = new VIAM.PowerSensorClient(
|
|
13
|
+
* machine,
|
|
14
|
+
* 'my_power_sensor'
|
|
15
|
+
* );
|
|
16
|
+
* const [voltage, isAc] = await powerSensor.getVoltage();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
6
19
|
getVoltage(extra?: Struct): Promise<readonly [number, boolean]>;
|
|
7
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Get Current in amps and a boolean indicating whether the voltage is AC
|
|
22
|
+
* (true) or DC (false).
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* const powerSensor = new VIAM.PowerSensorClient(
|
|
28
|
+
* machine,
|
|
29
|
+
* 'my_power_sensor'
|
|
30
|
+
* );
|
|
31
|
+
* const [current, isAc] = await powerSensor.getCurrent();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
8
34
|
getCurrent(extra?: Struct): Promise<readonly [number, boolean]>;
|
|
9
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Get power in watts.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* const powerSensor = new VIAM.PowerSensorClient(
|
|
42
|
+
* machine,
|
|
43
|
+
* 'my_power_sensor'
|
|
44
|
+
* );
|
|
45
|
+
* const power = await powerSensor.getPower();
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
10
48
|
getPower(extra?: Struct): Promise<number>;
|
|
11
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Return the readings of a sensor.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* const powerSensor = new VIAM.PowerSensorClient(
|
|
56
|
+
* machine,
|
|
57
|
+
* 'my_power_sensor'
|
|
58
|
+
* );
|
|
59
|
+
* const readings = await powerSensor.getReadings();
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
12
62
|
getReadings(extra?: Struct): Promise<Record<string, JsonValue>>;
|
|
13
63
|
}
|
|
@@ -2,6 +2,17 @@ import type { JsonValue, Struct } from '@bufbuild/protobuf';
|
|
|
2
2
|
import type { Resource } from '../../types';
|
|
3
3
|
/** Represents a physical sensing device that can provide measurement readings. */
|
|
4
4
|
export interface Sensor extends Resource {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Return the readings of a sensor.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* const sensor = new VIAM.SensorClient(machine, 'my_sensor');
|
|
12
|
+
*
|
|
13
|
+
* // Get the readings of a sensor.
|
|
14
|
+
* const readings = await sensor.getReadings();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
6
17
|
getReadings(extra?: Struct): Promise<Record<string, JsonValue>>;
|
|
7
18
|
}
|
|
@@ -561,6 +561,14 @@ export declare class TabularDataByMQLRequest extends Message<TabularDataByMQLReq
|
|
|
561
561
|
*/
|
|
562
562
|
useRecentData?: boolean;
|
|
563
563
|
|
|
564
|
+
/**
|
|
565
|
+
* if set, MQL query will target the sink collection for the data pipeline name
|
|
566
|
+
* referenced by this value under the given organization.
|
|
567
|
+
*
|
|
568
|
+
* @generated from field: optional string use_data_pipeline = 5;
|
|
569
|
+
*/
|
|
570
|
+
useDataPipeline?: string;
|
|
571
|
+
|
|
564
572
|
constructor(data?: PartialMessage<TabularDataByMQLRequest>);
|
|
565
573
|
|
|
566
574
|
static readonly runtime: typeof proto3;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// @generated by protoc-gen-connect-es v1.5.0
|
|
2
|
+
// @generated from file app/datapipelines/v1/data_pipelines.proto (package viam.app.datapipelines.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import { CreateDataPipelineRequest, CreateDataPipelineResponse, DeleteDataPipelineRequest, DeleteDataPipelineResponse, GetDataPipelineRequest, GetDataPipelineResponse, ListDataPipelinesRequest, ListDataPipelinesResponse, UpdateDataPipelineRequest, UpdateDataPipelineResponse } from "./data_pipelines_pb.js";
|
|
7
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* DataPipelinesService is used to manage data pipelines.
|
|
11
|
+
*
|
|
12
|
+
* @generated from service viam.app.datapipelines.v1.DataPipelinesService
|
|
13
|
+
*/
|
|
14
|
+
export declare const DataPipelinesService: {
|
|
15
|
+
readonly typeName: "viam.app.datapipelines.v1.DataPipelinesService",
|
|
16
|
+
readonly methods: {
|
|
17
|
+
/**
|
|
18
|
+
* GetDataPipeline retrieves a specific data pipeline by its id.
|
|
19
|
+
*
|
|
20
|
+
* @generated from rpc viam.app.datapipelines.v1.DataPipelinesService.GetDataPipeline
|
|
21
|
+
*/
|
|
22
|
+
readonly getDataPipeline: {
|
|
23
|
+
readonly name: "GetDataPipeline",
|
|
24
|
+
readonly I: typeof GetDataPipelineRequest,
|
|
25
|
+
readonly O: typeof GetDataPipelineResponse,
|
|
26
|
+
readonly kind: MethodKind.Unary,
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* ListDataPipelines returns a list of data pipelines based on organization id.
|
|
30
|
+
*
|
|
31
|
+
* @generated from rpc viam.app.datapipelines.v1.DataPipelinesService.ListDataPipelines
|
|
32
|
+
*/
|
|
33
|
+
readonly listDataPipelines: {
|
|
34
|
+
readonly name: "ListDataPipelines",
|
|
35
|
+
readonly I: typeof ListDataPipelinesRequest,
|
|
36
|
+
readonly O: typeof ListDataPipelinesResponse,
|
|
37
|
+
readonly kind: MethodKind.Unary,
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* CreateDataPipeline creates a new data pipeline with the provided configuration.
|
|
41
|
+
*
|
|
42
|
+
* @generated from rpc viam.app.datapipelines.v1.DataPipelinesService.CreateDataPipeline
|
|
43
|
+
*/
|
|
44
|
+
readonly createDataPipeline: {
|
|
45
|
+
readonly name: "CreateDataPipeline",
|
|
46
|
+
readonly I: typeof CreateDataPipelineRequest,
|
|
47
|
+
readonly O: typeof CreateDataPipelineResponse,
|
|
48
|
+
readonly kind: MethodKind.Unary,
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* UpdateDataPipeline modifies an existing data pipeline's configuration.
|
|
52
|
+
*
|
|
53
|
+
* @generated from rpc viam.app.datapipelines.v1.DataPipelinesService.UpdateDataPipeline
|
|
54
|
+
*/
|
|
55
|
+
readonly updateDataPipeline: {
|
|
56
|
+
readonly name: "UpdateDataPipeline",
|
|
57
|
+
readonly I: typeof UpdateDataPipelineRequest,
|
|
58
|
+
readonly O: typeof UpdateDataPipelineResponse,
|
|
59
|
+
readonly kind: MethodKind.Unary,
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* DeleteDataPipeline deletes a data pipeline from the database.
|
|
63
|
+
*
|
|
64
|
+
* @generated from rpc viam.app.datapipelines.v1.DataPipelinesService.DeleteDataPipeline
|
|
65
|
+
*/
|
|
66
|
+
readonly deleteDataPipeline: {
|
|
67
|
+
readonly name: "DeleteDataPipeline",
|
|
68
|
+
readonly I: typeof DeleteDataPipelineRequest,
|
|
69
|
+
readonly O: typeof DeleteDataPipelineResponse,
|
|
70
|
+
readonly kind: MethodKind.Unary,
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|