@viamrobotics/sdk 0.73.0-b.0 → 0.73.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/app/app-client.d.ts +254 -130
- package/dist/app/billing-client.d.ts +15 -6
- package/dist/app/data-client.d.ts +252 -175
- package/dist/app/ml-training-client.d.ts +5 -5
- package/dist/app/provisioning-client.d.ts +4 -2
- package/dist/app/viam-client.d.ts +1 -1
- package/dist/app/viam-transport.d.ts +4 -1
- package/dist/assert.d.ts +3 -2
- package/dist/components/arm/arm.d.ts +2 -2
- package/dist/components/arm/client.d.ts +1 -1
- package/dist/components/audio-out/audio-out.d.ts +7 -6
- package/dist/components/audioin.d.ts +1 -1
- package/dist/components/audioout.d.ts +1 -1
- package/dist/components/base/base.d.ts +11 -10
- package/dist/components/board/board.d.ts +15 -8
- package/dist/components/board/client.d.ts +1 -1
- package/dist/components/camera/camera.d.ts +4 -2
- package/dist/components/camera/client.d.ts +2 -2
- package/dist/components/encoder/encoder.d.ts +5 -4
- package/dist/components/encoder.d.ts +1 -1
- package/dist/components/gantry/gantry.d.ts +10 -7
- package/dist/components/generic/generic.d.ts +4 -1
- package/dist/components/gripper/gripper.d.ts +2 -1
- package/dist/components/input-controller/input-controller.d.ts +15 -5
- package/dist/components/inputcontroller.d.ts +1 -1
- package/dist/components/motor/motor.d.ts +19 -17
- package/dist/components/movement-sensor/movement-sensor.d.ts +42 -14
- package/dist/components/pose-tracker/pose-tracker.d.ts +4 -1
- package/dist/components/power-sensor/power-sensor.d.ts +20 -6
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/debug.d.ts +15 -7
- package/dist/events.d.ts +10 -12
- package/dist/extra/stream/client.d.ts +11 -12
- package/dist/extra/stream/stream.d.ts +1 -1
- package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
- package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
- package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
- package/dist/gen/app/data/v1/data_connect.d.ts +1 -1
- package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
- package/dist/gen/app/dataset/v1/dataset_connect.d.ts +1 -1
- package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
- package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
- package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
- package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
- package/dist/gen/app/v1/app_connect.d.ts +1 -1
- package/dist/gen/app/v1/billing_connect.d.ts +1 -1
- package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
- package/dist/gen/app/v1/robot_connect.d.ts +1 -1
- package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
- package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
- package/dist/gen/component/audioout/v1/audioout_connect.d.ts +1 -1
- package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
- package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
- package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
- package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
- package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
- package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
- package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/component/gripper/v1/gripper_connect.d.ts +1 -1
- package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
- package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
- package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
- package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
- package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
- package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
- package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
- package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
- package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
- package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
- package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
- package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
- package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
- package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
- package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
- package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
- package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
- package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
- package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
- package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
- package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
- package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
- package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
- package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
- package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
- package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
- package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
- package/dist/main.d.ts +11 -10
- package/dist/main.es.js +33210 -28872
- package/dist/main.umd.js +7 -6
- package/dist/robot/client.d.ts +86 -59
- package/dist/robot/dial.d.ts +10 -7
- package/dist/robot/robot.d.ts +29 -27
- package/dist/rpc/client-channel.d.ts +1 -1
- package/dist/rpc/client-stream.d.ts +5 -4
- package/dist/rpc/connection-closed-error.d.ts +1 -1
- package/dist/rpc/dial.d.ts +41 -34
- package/dist/rpc/signaling-exchange.d.ts +1 -1
- package/dist/rpc/stream-client-stream.d.ts +1 -1
- package/dist/rpc/unary-client-stream.d.ts +1 -1
- package/dist/services/data-manager/client.d.ts +14 -5
- package/dist/services/data-manager/data-manager.d.ts +1 -1
- package/dist/services/generic/client.d.ts +1 -1
- package/dist/services/generic/generic.d.ts +2 -1
- package/dist/services/motion/motion.d.ts +78 -53
- package/dist/services/navigation/client.d.ts +1 -1
- package/dist/services/navigation/navigation.d.ts +4 -2
- package/dist/services/slam/client.d.ts +1 -1
- package/dist/services/slam/slam.d.ts +6 -4
- package/dist/services/video/video.d.ts +6 -2
- package/dist/services/vision/vision.d.ts +19 -13
- package/dist/services/world-state-store/world-state-store.d.ts +19 -6
- package/dist/types.d.ts +7 -5
- package/dist/utils.d.ts +5 -5
- package/package.json +29 -29
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldMask, type JsonValue, type PartialMessage } from '@bufbuild/protobuf';
|
|
2
2
|
import { type Client, type Transport } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { BinaryID, CaptureMetadata, Filter, Index, IndexableCollection, Order, Sequence, SequenceResourceFilter, TabularDataSource, TabularDataSourceType, DeleteTabularFilter } from '../gen/app/data/v1/data_pb';
|
|
4
4
|
import { DataPipelinesService } from '../gen/app/datapipelines/v1/data_pipelines_connect';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { DataPipeline, DataPipelineRun } from '../gen/app/datapipelines/v1/data_pipelines_pb';
|
|
6
|
+
import { DatasetType, type Dataset as PBDataset, type GetSequenceDatasetExportResponse } from '../gen/app/dataset/v1/dataset_pb';
|
|
7
7
|
export type FilterOptions = Partial<Filter> & {
|
|
8
8
|
endTime?: Date;
|
|
9
9
|
startTime?: Date;
|
|
@@ -32,24 +32,30 @@ interface TabularDataPoint {
|
|
|
32
32
|
}
|
|
33
33
|
/** Optional parameters for uploading files */
|
|
34
34
|
export interface FileUploadOptions {
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Optional type of the component associated with the file (for example,
|
|
37
|
+
* "movement_sensor").
|
|
38
|
+
*/
|
|
36
39
|
componentType?: string;
|
|
37
40
|
/** Optional name of the component associated with the file. */
|
|
38
41
|
componentName?: string;
|
|
39
42
|
/** Optional name of the method associated with the file. */
|
|
40
43
|
methodName?: string;
|
|
41
44
|
/**
|
|
42
|
-
* Optional name of the file. The empty string `""` will be assigned as the
|
|
43
|
-
* provided.
|
|
45
|
+
* Optional name of the file. The empty string `""` will be assigned as the
|
|
46
|
+
* file name if one isn't provided.
|
|
44
47
|
*/
|
|
45
48
|
fileName?: string;
|
|
46
49
|
/**
|
|
47
|
-
* Optional file extension. The empty string `""` will be assigned as the file
|
|
48
|
-
* isn't provided. Files with a `.jpeg`, `.jpg`, or `.png`
|
|
49
|
-
* **Images** tab.
|
|
50
|
+
* Optional file extension. The empty string `""` will be assigned as the file
|
|
51
|
+
* extension if one isn't provided. Files with a `.jpeg`, `.jpg`, or `.png`
|
|
52
|
+
* extension will be saved to the **Images** tab.
|
|
50
53
|
*/
|
|
51
54
|
fileExtension?: string;
|
|
52
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Optional list of tags to allow for tag-based filtering when retrieving
|
|
57
|
+
* data.
|
|
58
|
+
*/
|
|
53
59
|
tags?: string[];
|
|
54
60
|
/** Optional list of datasets to add the data to. */
|
|
55
61
|
datasetIds?: string[];
|
|
@@ -59,16 +65,19 @@ export interface BinaryDataCaptureUploadOptions {
|
|
|
59
65
|
/**
|
|
60
66
|
* Optional MIME type of the binary data (for example, "image/jpeg").
|
|
61
67
|
*
|
|
62
|
-
* If provided, the backend will use this value. Otherwise, it may derive the
|
|
63
|
-
* file extension.
|
|
68
|
+
* If provided, the backend will use this value. Otherwise, it may derive the
|
|
69
|
+
* MIME type from the file extension.
|
|
64
70
|
*/
|
|
65
71
|
mimeType?: string;
|
|
66
72
|
/**
|
|
67
|
-
* Optional file extension of the binary data including the period, for
|
|
68
|
-
* ".pcd".
|
|
73
|
+
* Optional file extension of the binary data including the period, for
|
|
74
|
+
* example ".jpg", ".png", or ".pcd".
|
|
69
75
|
*/
|
|
70
76
|
fileExtension?: string;
|
|
71
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Optional list of tags to allow for tag-based filtering when retrieving
|
|
79
|
+
* data.
|
|
80
|
+
*/
|
|
72
81
|
tags?: string[];
|
|
73
82
|
/** Optional list of dataset IDs to add the data to. */
|
|
74
83
|
datasetIds?: string[];
|
|
@@ -95,7 +104,7 @@ export declare class DataClient {
|
|
|
95
104
|
* 'rdk:component:sensor',
|
|
96
105
|
* 'Readings',
|
|
97
106
|
* new Date('2025-03-25'),
|
|
98
|
-
* new Date('2024-03-27')
|
|
107
|
+
* new Date('2024-03-27')
|
|
99
108
|
* );
|
|
100
109
|
* ```
|
|
101
110
|
*
|
|
@@ -103,11 +112,15 @@ export declare class DataClient {
|
|
|
103
112
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#exporttabulardata).
|
|
104
113
|
*
|
|
105
114
|
* @param partId The ID of the part that owns the data
|
|
106
|
-
* @param resourceName The name of the requested resource that captured the
|
|
107
|
-
*
|
|
115
|
+
* @param resourceName The name of the requested resource that captured the
|
|
116
|
+
* data
|
|
117
|
+
* @param resourceSubtype The subtype of the requested resource that captured
|
|
118
|
+
* the data
|
|
108
119
|
* @param methodName The data capture method name
|
|
109
|
-
* @param startTime Optional start time (`Date` object) for requesting a
|
|
110
|
-
*
|
|
120
|
+
* @param startTime Optional start time (`Date` object) for requesting a
|
|
121
|
+
* specific range of data
|
|
122
|
+
* @param endTime Optional end time (`Date` object) for requesting a specific
|
|
123
|
+
* range of data
|
|
111
124
|
* @returns An array of unified tabular data and metadata.
|
|
112
125
|
*/
|
|
113
126
|
exportTabularData(partId: string, resourceName: string, resourceSubtype: string, methodName: string, startTime?: Date, endTime?: Date, additionalParams?: Record<string, JsonValue>): Promise<TabularDataPoint[]>;
|
|
@@ -119,7 +132,7 @@ export declare class DataClient {
|
|
|
119
132
|
* ```ts
|
|
120
133
|
* const data = await dataClient.tabularDataBySQL(
|
|
121
134
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
122
|
-
* 'SELECT * FROM readings LIMIT 5'
|
|
135
|
+
* 'SELECT * FROM readings LIMIT 5'
|
|
123
136
|
* );
|
|
124
137
|
* ```
|
|
125
138
|
*
|
|
@@ -151,7 +164,7 @@ export declare class DataClient {
|
|
|
151
164
|
*
|
|
152
165
|
* const data = await dataClient.tabularDataByMQL(
|
|
153
166
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
154
|
-
* mqlQuery
|
|
167
|
+
* mqlQuery
|
|
155
168
|
* );
|
|
156
169
|
* ```
|
|
157
170
|
*
|
|
@@ -160,18 +173,19 @@ export declare class DataClient {
|
|
|
160
173
|
*
|
|
161
174
|
* @param organizationId The ID of the organization that owns the data
|
|
162
175
|
* @param query The MQL query to run as a list of BSON documents
|
|
163
|
-
* @param useRecentData Whether to query blob storage or your recent data
|
|
164
|
-
* false. Deprecated - use dataSource instead.
|
|
165
|
-
* @param dataSource The data source to query. Defaults to the standard data
|
|
176
|
+
* @param useRecentData Whether to query blob storage or your recent data
|
|
177
|
+
* store. Defaults to false. Deprecated - use dataSource instead.
|
|
178
|
+
* @param dataSource The data source to query. Defaults to the standard data
|
|
179
|
+
* source.
|
|
166
180
|
* @param queryPrefixName Optional name of the query prefix.
|
|
167
181
|
* @returns An array of data objects
|
|
168
182
|
*/
|
|
169
183
|
tabularDataByMQL(organizationId: string, query: Uint8Array[] | Record<string, Date | JsonValue>[], useRecentData?: boolean, tabularDataSource?: TabularDataSource, queryPrefixName?: string): Promise<(Object | any[])[]>;
|
|
170
184
|
/**
|
|
171
|
-
* Filter and get a page of tabular data. The returned metadata might be empty
|
|
172
|
-
* index of the data is out of the bounds of the returned
|
|
173
|
-
* paginated into pages of `limit` items, and
|
|
174
|
-
* tuple.
|
|
185
|
+
* Filter and get a page of tabular data. The returned metadata might be empty
|
|
186
|
+
* if the metadata index of the data is out of the bounds of the returned
|
|
187
|
+
* metadata list. The data will be paginated into pages of `limit` items, and
|
|
188
|
+
* the pagination ID will be included in the returned tuple.
|
|
175
189
|
*
|
|
176
190
|
* @example
|
|
177
191
|
*
|
|
@@ -181,24 +195,27 @@ export declare class DataClient {
|
|
|
181
195
|
* componentName: 'sensor-1',
|
|
182
196
|
* componentType: 'rdk:component:sensor',
|
|
183
197
|
* } as Filter,
|
|
184
|
-
* 5
|
|
198
|
+
* 5
|
|
185
199
|
* );
|
|
186
200
|
* ```
|
|
187
201
|
*
|
|
188
202
|
* For more information, see [Data
|
|
189
203
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#tabulardatabyfilter).
|
|
190
204
|
*
|
|
191
|
-
* @param filter Optional `pb.Filter` specifying tabular data to retrieve. No
|
|
192
|
-
* tabular data.
|
|
193
|
-
* @param limit The maximum number of entries to include in a page. Defaults
|
|
205
|
+
* @param filter Optional `pb.Filter` specifying tabular data to retrieve. No
|
|
206
|
+
* `filter` implies all tabular data.
|
|
207
|
+
* @param limit The maximum number of entries to include in a page. Defaults
|
|
208
|
+
* to 50 if unspecfied
|
|
194
209
|
* @param sortOrder The desired sort order of the data
|
|
195
|
-
* @param last Optional string indicating the ID of the last-returned data. If
|
|
196
|
-
* server will return the next data entries after the `last`
|
|
197
|
-
* @param countOnly Whether to return only the total count of entries
|
|
198
|
-
* @param includeInternalData Whether to retun internal data. Internal data is used for
|
|
199
|
-
* Viam-specific data ingestion, like cloud SLAM. Defaults to `false`.
|
|
200
|
-
* @returns An array of data objects, the count (number of entries), and the last-returned page
|
|
210
|
+
* @param last Optional string indicating the ID of the last-returned data. If
|
|
211
|
+
* provided, the server will return the next data entries after the `last`
|
|
201
212
|
* ID.
|
|
213
|
+
* @param countOnly Whether to return only the total count of entries
|
|
214
|
+
* @param includeInternalData Whether to retun internal data. Internal data is
|
|
215
|
+
* used for Viam-specific data ingestion, like cloud SLAM. Defaults to
|
|
216
|
+
* `false`.
|
|
217
|
+
* @returns An array of data objects, the count (number of entries), and the
|
|
218
|
+
* last-returned page ID.
|
|
202
219
|
*/
|
|
203
220
|
tabularDataByFilter(filter?: Filter, limit?: number, sortOrder?: Order, last?: string, countOnly?: boolean, includeInternalData?: boolean): Promise<{
|
|
204
221
|
data: TabularData[];
|
|
@@ -206,10 +223,10 @@ export declare class DataClient {
|
|
|
206
223
|
last: string;
|
|
207
224
|
}>;
|
|
208
225
|
/**
|
|
209
|
-
* Filter and get a page of binary data. The returned metadata might be empty
|
|
210
|
-
* index of the data is out of the bounds of the returned
|
|
211
|
-
* paginated into pages of `limit` items, and
|
|
212
|
-
* tuple.
|
|
226
|
+
* Filter and get a page of binary data. The returned metadata might be empty
|
|
227
|
+
* if the metadata index of the data is out of the bounds of the returned
|
|
228
|
+
* metadata list. The data will be paginated into pages of `limit` items, and
|
|
229
|
+
* the pagination ID will be included in the returned tuple.
|
|
213
230
|
*
|
|
214
231
|
* @example
|
|
215
232
|
*
|
|
@@ -219,25 +236,29 @@ export declare class DataClient {
|
|
|
219
236
|
* componentName: 'camera-1',
|
|
220
237
|
* componentType: 'rdk:component:camera',
|
|
221
238
|
* } as Filter,
|
|
222
|
-
* 1
|
|
239
|
+
* 1
|
|
223
240
|
* );
|
|
224
241
|
* ```
|
|
225
242
|
*
|
|
226
243
|
* For more information, see [Data
|
|
227
244
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#binarydatabyfilter).
|
|
228
245
|
*
|
|
229
|
-
* @param filter Optional `pb.Filter` specifying binary data to retrieve. No
|
|
230
|
-
* binary data.
|
|
231
|
-
* @param limit The maximum number of entries to include in a page. Defaults
|
|
246
|
+
* @param filter Optional `pb.Filter` specifying binary data to retrieve. No
|
|
247
|
+
* `filter` implies all binary data.
|
|
248
|
+
* @param limit The maximum number of entries to include in a page. Defaults
|
|
249
|
+
* to 50 if unspecfied
|
|
232
250
|
* @param sortOrder The desired sort order of the data
|
|
233
|
-
* @param last Optional string indicating the ID of the last-returned data. If
|
|
234
|
-
* server will return the next data entries after the `last`
|
|
235
|
-
* @param includeBinary Whether to include binary file data with each retrieved file
|
|
236
|
-
* @param countOnly Whether to return only the total count of entries
|
|
237
|
-
* @param includeInternalData Whether to retun internal data. Internal data is used for
|
|
238
|
-
* Viam-specific data ingestion, like cloud SLAM. Defaults to `false`.
|
|
239
|
-
* @returns An array of data objects, the count (number of entries), and the last-returned page
|
|
251
|
+
* @param last Optional string indicating the ID of the last-returned data. If
|
|
252
|
+
* provided, the server will return the next data entries after the `last`
|
|
240
253
|
* ID.
|
|
254
|
+
* @param includeBinary Whether to include binary file data with each
|
|
255
|
+
* retrieved file
|
|
256
|
+
* @param countOnly Whether to return only the total count of entries
|
|
257
|
+
* @param includeInternalData Whether to retun internal data. Internal data is
|
|
258
|
+
* used for Viam-specific data ingestion, like cloud SLAM. Defaults to
|
|
259
|
+
* `false`.
|
|
260
|
+
* @returns An array of data objects, the count (number of entries), and the
|
|
261
|
+
* last-returned page ID.
|
|
241
262
|
*/
|
|
242
263
|
binaryDataByFilter(filter?: Filter, limit?: number, sortOrder?: Order, last?: string, includeBinary?: boolean, countOnly?: boolean, includeInternalData?: boolean): Promise<{
|
|
243
264
|
data: import("../gen/app/data/v1/data_pb").BinaryData[];
|
|
@@ -259,7 +280,8 @@ export declare class DataClient {
|
|
|
259
280
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#binarydatabyids).
|
|
260
281
|
*
|
|
261
282
|
* @param ids The IDs of the requested binary data
|
|
262
|
-
* @param includeBinary Whether to include binary file data with each
|
|
283
|
+
* @param includeBinary Whether to include binary file data with each
|
|
284
|
+
* retrieved file
|
|
263
285
|
* @returns An array of data objects
|
|
264
286
|
*/
|
|
265
287
|
binaryDataByIds(ids: string[] | BinaryID[], includeBinary?: boolean): Promise<import("../gen/app/data/v1/data_pb").BinaryData[]>;
|
|
@@ -270,7 +292,7 @@ export declare class DataClient {
|
|
|
270
292
|
*
|
|
271
293
|
* ```ts
|
|
272
294
|
* const signedUrl = await dataClient.createBinaryDataSignedURL(
|
|
273
|
-
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh'
|
|
295
|
+
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh'
|
|
274
296
|
* );
|
|
275
297
|
* ```
|
|
276
298
|
*
|
|
@@ -289,7 +311,7 @@ export declare class DataClient {
|
|
|
289
311
|
* ```ts
|
|
290
312
|
* const data = await dataClient.deleteTabularData(
|
|
291
313
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
292
|
-
* 10
|
|
314
|
+
* 10
|
|
293
315
|
* );
|
|
294
316
|
*
|
|
295
317
|
* // Delete with additional filter constraints
|
|
@@ -299,7 +321,7 @@ export declare class DataClient {
|
|
|
299
321
|
* {
|
|
300
322
|
* locationIds: ['location-id'],
|
|
301
323
|
* componentName: 'camera',
|
|
302
|
-
* }
|
|
324
|
+
* }
|
|
303
325
|
* );
|
|
304
326
|
* ```
|
|
305
327
|
*
|
|
@@ -307,12 +329,12 @@ export declare class DataClient {
|
|
|
307
329
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#deletetabulardata).
|
|
308
330
|
*
|
|
309
331
|
* @param organizationId The ID of organization to delete data from
|
|
310
|
-
* @param deleteOlderThanDays Delete data that was captured more than this
|
|
311
|
-
* example, a value of 10 deletes any data that was
|
|
312
|
-
* deletes all existing data.
|
|
313
|
-
* @param filter Optional filter to further constrain which data is deleted.
|
|
314
|
-
* data matching the filter will be deleted. If omitted,
|
|
315
|
-
* organization_id and delete_older_than_days.
|
|
332
|
+
* @param deleteOlderThanDays Delete data that was captured more than this
|
|
333
|
+
* many days ago. For example, a value of 10 deletes any data that was
|
|
334
|
+
* captured more than 10 days ago. A value of 0 deletes all existing data.
|
|
335
|
+
* @param filter Optional filter to further constrain which data is deleted.
|
|
336
|
+
* If provided, only data matching the filter will be deleted. If omitted,
|
|
337
|
+
* data is deleted based on organization_id and delete_older_than_days.
|
|
316
338
|
* @returns The number of items deleted
|
|
317
339
|
*/
|
|
318
340
|
deleteTabularData(organizationId: string, deleteOlderThanDays: number, filter?: PartialMessage<DeleteTabularFilter>): Promise<bigint>;
|
|
@@ -334,9 +356,10 @@ export declare class DataClient {
|
|
|
334
356
|
* For more information, see [Data
|
|
335
357
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#deletebinarydatabyfilter).
|
|
336
358
|
*
|
|
337
|
-
* @param filter Optional `pb.Filter` specifying binary data to delete. No
|
|
338
|
-
* binary data.
|
|
339
|
-
* @param includeInternalData Whether or not to delete internal data. Default
|
|
359
|
+
* @param filter Optional `pb.Filter` specifying binary data to delete. No
|
|
360
|
+
* `filter` implies all binary data.
|
|
361
|
+
* @param includeInternalData Whether or not to delete internal data. Default
|
|
362
|
+
* is true
|
|
340
363
|
* @returns The number of items deleted
|
|
341
364
|
*/
|
|
342
365
|
deleteBinaryDataByFilter(filter?: Filter, includeInternalData?: boolean): Promise<bigint>;
|
|
@@ -368,14 +391,15 @@ export declare class DataClient {
|
|
|
368
391
|
* ['tag1', 'tag2'],
|
|
369
392
|
* [
|
|
370
393
|
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh',
|
|
371
|
-
* ]
|
|
394
|
+
* ]
|
|
372
395
|
* );
|
|
373
396
|
* ```
|
|
374
397
|
*
|
|
375
398
|
* For more information, see [Data
|
|
376
399
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#addtagstobinarydatabyids).
|
|
377
400
|
*
|
|
378
|
-
* @param tags The list of tags to add to specified binary data. Must be
|
|
401
|
+
* @param tags The list of tags to add to specified binary data. Must be
|
|
402
|
+
* non-empty.
|
|
379
403
|
* @param ids The IDs of the data to be tagged. Must be non-empty.
|
|
380
404
|
*/
|
|
381
405
|
addTagsToBinaryDataByIds(tags: string[], ids: string[] | BinaryID[]): Promise<void>;
|
|
@@ -391,7 +415,7 @@ export declare class DataClient {
|
|
|
391
415
|
* {
|
|
392
416
|
* componentName: 'camera-1',
|
|
393
417
|
* } as Filter,
|
|
394
|
-
* ]
|
|
418
|
+
* ]
|
|
395
419
|
* );
|
|
396
420
|
* ```
|
|
397
421
|
*
|
|
@@ -399,8 +423,8 @@ export declare class DataClient {
|
|
|
399
423
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#addtagstobinarydatabyfilter).
|
|
400
424
|
*
|
|
401
425
|
* @param tags The tags to add to the data
|
|
402
|
-
* @param filter Optional `pb.Filter` specifying binary data to add tags to.
|
|
403
|
-
* all binary data.
|
|
426
|
+
* @param filter Optional `pb.Filter` specifying binary data to add tags to.
|
|
427
|
+
* No `filter` implies all binary data.
|
|
404
428
|
*/
|
|
405
429
|
addTagsToBinaryDataByFilter(tags: string[], filter?: Filter): Promise<void>;
|
|
406
430
|
/**
|
|
@@ -413,14 +437,15 @@ export declare class DataClient {
|
|
|
413
437
|
* ['tag1', 'tag2'],
|
|
414
438
|
* [
|
|
415
439
|
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh',
|
|
416
|
-
* ]
|
|
440
|
+
* ]
|
|
417
441
|
* );
|
|
418
442
|
* ```
|
|
419
443
|
*
|
|
420
444
|
* For more information, see [Data
|
|
421
445
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#removetagsfrombinarydatabyids).
|
|
422
446
|
*
|
|
423
|
-
* @param tags List of tags to remove from specified binary data. Must be
|
|
447
|
+
* @param tags List of tags to remove from specified binary data. Must be
|
|
448
|
+
* non-empty.
|
|
424
449
|
* @param ids The IDs of the data to be edited. Must be non-empty.
|
|
425
450
|
* @returns The number of items deleted
|
|
426
451
|
*/
|
|
@@ -431,21 +456,25 @@ export declare class DataClient {
|
|
|
431
456
|
* @example
|
|
432
457
|
*
|
|
433
458
|
* ```ts
|
|
434
|
-
* const data = await dataClient.removeTagsFromBinaryDataByFilter(
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
459
|
+
* const data = await dataClient.removeTagsFromBinaryDataByFilter(
|
|
460
|
+
* ['tag1', 'tag2'],
|
|
461
|
+
* {
|
|
462
|
+
* componentName: 'camera-1',
|
|
463
|
+
* componentType: 'rdk:component:camera',
|
|
464
|
+
* organizationIds: ['123abc45-1234-5678-90ab-cdef12345678'],
|
|
465
|
+
* startTime: new Date('2025-03-19'),
|
|
466
|
+
* endTime: new Date('2025-03-20'),
|
|
467
|
+
* } as Filter
|
|
468
|
+
* );
|
|
441
469
|
* ```
|
|
442
470
|
*
|
|
443
471
|
* For more information, see [Data
|
|
444
472
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#removetagsfrombinarydatabyfilter).
|
|
445
473
|
*
|
|
446
|
-
* @param tags List of tags to remove from specified binary data. Must be
|
|
447
|
-
*
|
|
448
|
-
*
|
|
474
|
+
* @param tags List of tags to remove from specified binary data. Must be
|
|
475
|
+
* non-empty.
|
|
476
|
+
* @param filter Optional `pb.Filter` specifying binary data to add tags to.
|
|
477
|
+
* No `filter` implies all binary data.
|
|
449
478
|
* @returns The number of items deleted
|
|
450
479
|
*/
|
|
451
480
|
removeTagsFromBinaryDataByFilter(tags: string[], filter?: Filter): Promise<bigint>;
|
|
@@ -463,8 +492,8 @@ export declare class DataClient {
|
|
|
463
492
|
* For more information, see [Data
|
|
464
493
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#tagsbyfilter).
|
|
465
494
|
*
|
|
466
|
-
* @param filter Optional `pb.Filter` specifying what data to get tags from.
|
|
467
|
-
* all data.
|
|
495
|
+
* @param filter Optional `pb.Filter` specifying what data to get tags from.
|
|
496
|
+
* No `filter` implies all data.
|
|
468
497
|
* @returns The list of tags
|
|
469
498
|
*/
|
|
470
499
|
tagsByFilter(filter?: Filter): Promise<string[]>;
|
|
@@ -481,21 +510,26 @@ export declare class DataClient {
|
|
|
481
510
|
* 0.3,
|
|
482
511
|
* 0.6,
|
|
483
512
|
* 0.6,
|
|
484
|
-
* 0.4
|
|
513
|
+
* 0.4
|
|
485
514
|
* );
|
|
486
515
|
* ```
|
|
487
516
|
*
|
|
488
517
|
* For more information, see [Data
|
|
489
518
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#addboundingboxtoimagebyid).
|
|
490
519
|
*
|
|
491
|
-
* @param {string | BinaryID} binaryId The ID of the image to add the bounding
|
|
520
|
+
* @param {string | BinaryID} binaryId The ID of the image to add the bounding
|
|
521
|
+
* box to
|
|
492
522
|
* @param {string} label A label for the bounding box
|
|
493
|
-
* @param {number} xMinNormalized The min X value of the bounding box
|
|
494
|
-
*
|
|
495
|
-
* @param {number}
|
|
496
|
-
*
|
|
497
|
-
* @param {number}
|
|
498
|
-
* normalized
|
|
523
|
+
* @param {number} xMinNormalized The min X value of the bounding box
|
|
524
|
+
* normalized from 0 to 1
|
|
525
|
+
* @param {number} yMinNormalized The min Y value of the bounding box
|
|
526
|
+
* normalized from 0 to 1
|
|
527
|
+
* @param {number} xMaxNormalized The max X value of the bounding box
|
|
528
|
+
* normalized from 0 to 1
|
|
529
|
+
* @param {number} yMaxNormalized The max Y value of the bounding box
|
|
530
|
+
* normalized from 0 to 1
|
|
531
|
+
* @param {number} [confidence] Model's confidence in a predicted bounding box
|
|
532
|
+
* expressed as a normalized value from 0 to 1
|
|
499
533
|
* @returns The bounding box ID
|
|
500
534
|
*/
|
|
501
535
|
addBoundingBoxToImageById(binaryId: string | BinaryID, label: string, xMinNormalized: number, yMinNormalized: number, xMaxNormalized: number, yMaxNormalized: number, confidence?: number): Promise<string>;
|
|
@@ -507,7 +541,7 @@ export declare class DataClient {
|
|
|
507
541
|
* ```ts
|
|
508
542
|
* await dataClient.removeBoundingBoxFromImageById(
|
|
509
543
|
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh',
|
|
510
|
-
* '5Z9ryhkW7ULaXROjJO6ghPYulNllnH20QImda1iZFroZpQbjahK6igQ1WbYigXED'
|
|
544
|
+
* '5Z9ryhkW7ULaXROjJO6ghPYulNllnH20QImda1iZFroZpQbjahK6igQ1WbYigXED'
|
|
511
545
|
* );
|
|
512
546
|
* ```
|
|
513
547
|
*
|
|
@@ -536,16 +570,20 @@ export declare class DataClient {
|
|
|
536
570
|
* );
|
|
537
571
|
* ```
|
|
538
572
|
*
|
|
539
|
-
* @param {string | BinaryID} binaryId The ID of the image that the target
|
|
540
|
-
* attached to
|
|
573
|
+
* @param {string | BinaryID} binaryId The ID of the image that the target
|
|
574
|
+
* bounding box is attached to
|
|
541
575
|
* @param {string} bboxId The ID of the bounding box
|
|
542
576
|
* @param {string} [label] A label for the bounding box
|
|
543
|
-
* @param {number} [xMinNormalized] The min X value of the bounding box
|
|
544
|
-
*
|
|
545
|
-
* @param {number} [
|
|
546
|
-
*
|
|
547
|
-
* @param {number} [
|
|
548
|
-
* normalized
|
|
577
|
+
* @param {number} [xMinNormalized] The min X value of the bounding box
|
|
578
|
+
* normalized from 0 to 1
|
|
579
|
+
* @param {number} [yMinNormalized] The min Y value of the bounding box
|
|
580
|
+
* normalized from 0 to 1
|
|
581
|
+
* @param {number} [xMaxNormalized] The max X value of the bounding box
|
|
582
|
+
* normalized from 0 to 1
|
|
583
|
+
* @param {number} [yMaxNormalized] The max Y value of the bounding box
|
|
584
|
+
* normalized from 0 to 1
|
|
585
|
+
* @param {number} [confidence] Model's confidence in a predicted bounding box
|
|
586
|
+
* expressed as a normalized value from 0 to 1
|
|
549
587
|
*/
|
|
550
588
|
updateBoundingBox(binaryId: string | BinaryID, bboxId: string, label: string, xMinNormalized: number, yMinNormalized: number, xMaxNormalized: number, yMaxNormalized: number, confidence?: number): Promise<void>;
|
|
551
589
|
/**
|
|
@@ -562,21 +600,22 @@ export declare class DataClient {
|
|
|
562
600
|
* For more information, see [Data
|
|
563
601
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#boundingboxlabelsbyfilter).
|
|
564
602
|
*
|
|
565
|
-
* @param filter Optional `pb.Filter` specifying what data to get tags from.
|
|
566
|
-
* all labels.
|
|
603
|
+
* @param filter Optional `pb.Filter` specifying what data to get tags from.
|
|
604
|
+
* No `filter` implies all labels.
|
|
567
605
|
* @returns The list of bounding box labels
|
|
568
606
|
*/
|
|
569
607
|
boundingBoxLabelsByFilter(filter?: Filter): Promise<string[]>;
|
|
570
608
|
/**
|
|
571
|
-
* Configure a database user for the Viam organization's MongoDB Atlas Data
|
|
572
|
-
* It can also be used to reset the password of the
|
|
609
|
+
* Configure a database user for the Viam organization's MongoDB Atlas Data
|
|
610
|
+
* Federation instance. It can also be used to reset the password of the
|
|
611
|
+
* existing database user.
|
|
573
612
|
*
|
|
574
613
|
* @example
|
|
575
614
|
*
|
|
576
615
|
* ```ts
|
|
577
616
|
* await dataClient.configureDatabaseUser(
|
|
578
617
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
579
|
-
* 'Password01!'
|
|
618
|
+
* 'Password01!'
|
|
580
619
|
* );
|
|
581
620
|
* ```
|
|
582
621
|
*
|
|
@@ -594,7 +633,7 @@ export declare class DataClient {
|
|
|
594
633
|
*
|
|
595
634
|
* ```ts
|
|
596
635
|
* const hostname = await dataClient.getDatabaseConnection(
|
|
597
|
-
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
636
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
598
637
|
* );
|
|
599
638
|
* ```
|
|
600
639
|
*
|
|
@@ -615,7 +654,7 @@ export declare class DataClient {
|
|
|
615
654
|
* [
|
|
616
655
|
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh',
|
|
617
656
|
* ],
|
|
618
|
-
* '12ab3de4f56a7bcd89ef0ab1'
|
|
657
|
+
* '12ab3de4f56a7bcd89ef0ab1'
|
|
619
658
|
* );
|
|
620
659
|
* ```
|
|
621
660
|
*
|
|
@@ -636,7 +675,7 @@ export declare class DataClient {
|
|
|
636
675
|
* [
|
|
637
676
|
* 'ccb74b53-1235-4328-a4b9-91dff1915a50/x5vur1fmps/YAEzj5I1kTwtYsDdf4a7ctaJpGgKRHmnM9bJNVyblk52UpqmrnMVTITaBKZctKEh',
|
|
638
677
|
* ],
|
|
639
|
-
* '12ab3de4f56a7bcd89ef0ab1'
|
|
678
|
+
* '12ab3de4f56a7bcd89ef0ab1'
|
|
640
679
|
* );
|
|
641
680
|
* ```
|
|
642
681
|
*
|
|
@@ -655,7 +694,7 @@ export declare class DataClient {
|
|
|
655
694
|
* ```ts
|
|
656
695
|
* const datasetId = await dataClient.createDataset(
|
|
657
696
|
* 'my-new-dataset',
|
|
658
|
-
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
697
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
659
698
|
* );
|
|
660
699
|
* ```
|
|
661
700
|
*
|
|
@@ -663,7 +702,8 @@ export declare class DataClient {
|
|
|
663
702
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#createdataset).
|
|
664
703
|
*
|
|
665
704
|
* @param name The name of the new dataset
|
|
666
|
-
* @param organizationId The ID of the organization the dataset is being
|
|
705
|
+
* @param organizationId The ID of the organization the dataset is being
|
|
706
|
+
* created in
|
|
667
707
|
* @returns The ID of the dataset
|
|
668
708
|
*/
|
|
669
709
|
createDataset(name: string, organizationId: string): Promise<string>;
|
|
@@ -688,7 +728,10 @@ export declare class DataClient {
|
|
|
688
728
|
* @example
|
|
689
729
|
*
|
|
690
730
|
* ```ts
|
|
691
|
-
* await dataClient.renameDataset(
|
|
731
|
+
* await dataClient.renameDataset(
|
|
732
|
+
* '12ab3de4f56a7bcd89ef0ab1',
|
|
733
|
+
* 'my-new-dataset'
|
|
734
|
+
* );
|
|
692
735
|
* ```
|
|
693
736
|
*
|
|
694
737
|
* For more information, see [Data
|
|
@@ -705,7 +748,7 @@ export declare class DataClient {
|
|
|
705
748
|
*
|
|
706
749
|
* ```ts
|
|
707
750
|
* const datasets = await dataClient.listDatasetsByOrganizationID(
|
|
708
|
-
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
751
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
709
752
|
* );
|
|
710
753
|
* ```
|
|
711
754
|
*
|
|
@@ -723,7 +766,9 @@ export declare class DataClient {
|
|
|
723
766
|
* @example
|
|
724
767
|
*
|
|
725
768
|
* ```ts
|
|
726
|
-
* const datasets = await dataClient.listDatasetsByIds([
|
|
769
|
+
* const datasets = await dataClient.listDatasetsByIds([
|
|
770
|
+
* '12ab3de4f56a7bcd89ef0ab1',
|
|
771
|
+
* ]);
|
|
727
772
|
* ```
|
|
728
773
|
*
|
|
729
774
|
* For more information, see [Data
|
|
@@ -736,9 +781,10 @@ export declare class DataClient {
|
|
|
736
781
|
/**
|
|
737
782
|
* Uploads the content and metadata for tabular data.
|
|
738
783
|
*
|
|
739
|
-
* Upload tabular data collected on a robot through a specific component (for
|
|
740
|
-
* along with the relevant metadata to app.viam.com. Tabular
|
|
741
|
-
* subtab of the Data tab on
|
|
784
|
+
* Upload tabular data collected on a robot through a specific component (for
|
|
785
|
+
* example, a motor) along with the relevant metadata to app.viam.com. Tabular
|
|
786
|
+
* data can be found under the "Sensors" subtab of the Data tab on
|
|
787
|
+
* app.viam.com.
|
|
742
788
|
*
|
|
743
789
|
* @example
|
|
744
790
|
*
|
|
@@ -756,33 +802,42 @@ export declare class DataClient {
|
|
|
756
802
|
* 'rdk:component:sensor',
|
|
757
803
|
* 'my-sensor',
|
|
758
804
|
* 'Readings',
|
|
759
|
-
* [
|
|
805
|
+
* [
|
|
806
|
+
* [
|
|
807
|
+
* new Date('2025-03-26T10:00:00Z'),
|
|
808
|
+
* new Date('2025-03-26T10:00:00Z'),
|
|
809
|
+
* ],
|
|
810
|
+
* ]
|
|
760
811
|
* );
|
|
761
812
|
* ```
|
|
762
813
|
*
|
|
763
814
|
* For more information, see [Data
|
|
764
815
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#tabulardatacaptureupload).
|
|
765
816
|
*
|
|
766
|
-
* @param tabularData The list of data to be uploaded, represented tabularly
|
|
817
|
+
* @param tabularData The list of data to be uploaded, represented tabularly
|
|
818
|
+
* as an array.
|
|
767
819
|
* @param partId The part ID of the component used to capture the data
|
|
768
|
-
* @param componentType The type of the component used to capture the data
|
|
769
|
-
* "movementSensor")
|
|
820
|
+
* @param componentType The type of the component used to capture the data
|
|
821
|
+
* (for example, "movementSensor")
|
|
770
822
|
* @param componentName The name of the component used to capture the data
|
|
771
823
|
* @param methodName The name of the method used to capture the data.
|
|
772
|
-
* @param tags The list of tags to allow for tag-based filtering when
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
824
|
+
* @param tags The list of tags to allow for tag-based filtering when
|
|
825
|
+
* retrieving data
|
|
826
|
+
* @param dataRequestTimes Array of Date tuples, each containing two `Date`
|
|
827
|
+
* objects denoting the times this data was requested[0] by the robot and
|
|
828
|
+
* received[1] from the appropriate sensor. Passing a list of tabular data
|
|
829
|
+
* and Timestamps with length n > 1 will result in n datapoints being
|
|
830
|
+
* uploaded, all tied to the same metadata.
|
|
777
831
|
* @returns The file ID of the uploaded data
|
|
778
832
|
*/
|
|
779
833
|
tabularDataCaptureUpload(tabularData: Record<string, JsonValue>[], partId: string, componentType: string, componentName: string, methodName: string, dataRequestTimes: [Date, Date][], tags?: string[]): Promise<string>;
|
|
780
834
|
/**
|
|
781
835
|
* Uploads the content and metadata for binary data.
|
|
782
836
|
*
|
|
783
|
-
* Upload binary data collected on a robot through a specific component (for
|
|
784
|
-
* along with the relevant metadata to app.viam.com. binary
|
|
785
|
-
* subtab of the Data tab on
|
|
837
|
+
* Upload binary data collected on a robot through a specific component (for
|
|
838
|
+
* example, a motor) along with the relevant metadata to app.viam.com. binary
|
|
839
|
+
* data can be found under the "Sensors" subtab of the Data tab on
|
|
840
|
+
* app.viam.com.
|
|
786
841
|
*
|
|
787
842
|
* @example
|
|
788
843
|
*
|
|
@@ -794,7 +849,7 @@ export declare class DataClient {
|
|
|
794
849
|
* 'my-camera',
|
|
795
850
|
* 'ReadImage',
|
|
796
851
|
* [new Date('2025-03-19'), new Date('2025-03-19')],
|
|
797
|
-
* { mimeType: 'image/jpeg' }
|
|
852
|
+
* { mimeType: 'image/jpeg' }
|
|
798
853
|
* );
|
|
799
854
|
* ```
|
|
800
855
|
*
|
|
@@ -803,30 +858,36 @@ export declare class DataClient {
|
|
|
803
858
|
*
|
|
804
859
|
* @param binaryData The data to be uploaded, represented in bytes
|
|
805
860
|
* @param partId The part ID of the component used to capture the data
|
|
806
|
-
* @param componentType The type of the component used to capture the data
|
|
807
|
-
* "movementSensor")
|
|
861
|
+
* @param componentType The type of the component used to capture the data
|
|
862
|
+
* (for example, "movementSensor")
|
|
808
863
|
* @param componentName The name of the component used to capture the data
|
|
809
864
|
* @param methodName The name of the method used to capture the data.
|
|
810
|
-
* @param dataRequestTimes Tuple containing `Date` objects denoting the times
|
|
811
|
-
* requested[0] by the robot and received[1] from the
|
|
812
|
-
*
|
|
813
|
-
*
|
|
865
|
+
* @param dataRequestTimes Tuple containing `Date` objects denoting the times
|
|
866
|
+
* this data was requested[0] by the robot and received[1] from the
|
|
867
|
+
* appropriate sensor.
|
|
868
|
+
* @param options Optional parameters including `mimeType`, `fileExtension`,
|
|
869
|
+
* `tags`, and `datasetIds`.
|
|
814
870
|
* @returns The binary data ID of the uploaded data
|
|
815
871
|
*/
|
|
816
872
|
binaryDataCaptureUpload(binaryData: Uint8Array, partId: string, componentType: string, componentName: string, methodName: string, dataRequestTimes: [Date, Date], options?: BinaryDataCaptureUploadOptions): Promise<string>;
|
|
817
873
|
/**
|
|
818
874
|
* Upload arbitrary file data.
|
|
819
875
|
*
|
|
820
|
-
* Upload file data that may be stored on a robot along with the relevant
|
|
821
|
-
* be found in the **Files** tab of the **DATA**
|
|
876
|
+
* Upload file data that may be stored on a robot along with the relevant
|
|
877
|
+
* metadata. File data can be found in the **Files** tab of the **DATA**
|
|
878
|
+
* page.
|
|
822
879
|
*
|
|
823
880
|
* @example
|
|
824
881
|
*
|
|
825
882
|
* ```ts
|
|
826
|
-
* const binaryDataId = await dataClient.fileUpload(
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
883
|
+
* const binaryDataId = await dataClient.fileUpload(
|
|
884
|
+
* binaryData,
|
|
885
|
+
* 'INSERT YOUR PART ID',
|
|
886
|
+
* {
|
|
887
|
+
* fileExtension: '.jpeg',
|
|
888
|
+
* tags: ['tag_1', 'tag_2'],
|
|
889
|
+
* }
|
|
890
|
+
* );
|
|
830
891
|
* ```
|
|
831
892
|
*
|
|
832
893
|
* For more information, see [Data
|
|
@@ -839,7 +900,8 @@ export declare class DataClient {
|
|
|
839
900
|
*/
|
|
840
901
|
fileUpload(binaryData: Uint8Array, partId: string, options?: FileUploadOptions): Promise<string>;
|
|
841
902
|
/**
|
|
842
|
-
* Create an async generator of FileUploadRequests to use with FileUpload
|
|
903
|
+
* Create an async generator of FileUploadRequests to use with FileUpload
|
|
904
|
+
* methods.
|
|
843
905
|
*
|
|
844
906
|
* @param metadata The file's metadata
|
|
845
907
|
* @param data The binary data of the file
|
|
@@ -847,8 +909,8 @@ export declare class DataClient {
|
|
|
847
909
|
private static fileUploadRequests;
|
|
848
910
|
static createFilter(options: FilterOptions): Filter;
|
|
849
911
|
/**
|
|
850
|
-
* Gets the most recent tabular data captured from the specified data source,
|
|
851
|
-
* synced within the last year.
|
|
912
|
+
* Gets the most recent tabular data captured from the specified data source,
|
|
913
|
+
* as long as it was synced within the last year.
|
|
852
914
|
*
|
|
853
915
|
* @example
|
|
854
916
|
*
|
|
@@ -857,7 +919,7 @@ export declare class DataClient {
|
|
|
857
919
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
858
920
|
* 'my-sensor',
|
|
859
921
|
* 'rdk:component:sensor',
|
|
860
|
-
* 'Readings'
|
|
922
|
+
* 'Readings'
|
|
861
923
|
* );
|
|
862
924
|
* ```
|
|
863
925
|
*
|
|
@@ -865,12 +927,14 @@ export declare class DataClient {
|
|
|
865
927
|
* API](https://docs.viam.com/dev/reference/apis/data-client/#getlatesttabulardata).
|
|
866
928
|
*
|
|
867
929
|
* @param partId The ID of the part that owns the data
|
|
868
|
-
* @param resourceName The name of the requested resource that captured the
|
|
869
|
-
*
|
|
870
|
-
*
|
|
930
|
+
* @param resourceName The name of the requested resource that captured the
|
|
931
|
+
* data. Ex: "my-sensor"
|
|
932
|
+
* @param resourceSubtype The subtype of the requested resource that captured
|
|
933
|
+
* the data. Ex: "rdk:component:sensor"
|
|
871
934
|
* @param methodName The data capture method name. Ex: "Readings"
|
|
872
|
-
* @returns A tuple containing [timeCaptured, timeSynced, payload] or null if
|
|
873
|
-
* synced for the specified resource OR the most recently
|
|
935
|
+
* @returns A tuple containing [timeCaptured, timeSynced, payload] or null if
|
|
936
|
+
* no data has been synced for the specified resource OR the most recently
|
|
937
|
+
* captured data was over a year ago
|
|
874
938
|
*/
|
|
875
939
|
getLatestTabularData(partId: string, resourceName: string, resourceSubtype: string, methodName: string, additionalParams?: Record<string, JsonValue>): Promise<[Date, Date, Record<string, JsonValue>] | null>;
|
|
876
940
|
/**
|
|
@@ -880,7 +944,7 @@ export declare class DataClient {
|
|
|
880
944
|
*
|
|
881
945
|
* ```ts
|
|
882
946
|
* const pipelines = await dataClient.listDataPipelines(
|
|
883
|
-
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
947
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
884
948
|
* );
|
|
885
949
|
* ```
|
|
886
950
|
*
|
|
@@ -894,7 +958,9 @@ export declare class DataClient {
|
|
|
894
958
|
* @example
|
|
895
959
|
*
|
|
896
960
|
* ```ts
|
|
897
|
-
* const pipeline = await dataClient.getPipeline(
|
|
961
|
+
* const pipeline = await dataClient.getPipeline(
|
|
962
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
963
|
+
* );
|
|
898
964
|
* ```
|
|
899
965
|
*
|
|
900
966
|
* @param pipelineId The ID of the data pipeline
|
|
@@ -944,7 +1010,9 @@ export declare class DataClient {
|
|
|
944
1010
|
* @example
|
|
945
1011
|
*
|
|
946
1012
|
* ```ts
|
|
947
|
-
* await dataClient.deleteDataPipeline(
|
|
1013
|
+
* await dataClient.deleteDataPipeline(
|
|
1014
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
1015
|
+
* );
|
|
948
1016
|
* ```
|
|
949
1017
|
*
|
|
950
1018
|
* @param pipelineId The ID of the data pipeline
|
|
@@ -956,7 +1024,9 @@ export declare class DataClient {
|
|
|
956
1024
|
* @example
|
|
957
1025
|
*
|
|
958
1026
|
* ```ts
|
|
959
|
-
* const page = await dataClient.listDataPipelineRuns(
|
|
1027
|
+
* const page = await dataClient.listDataPipelineRuns(
|
|
1028
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
1029
|
+
* );
|
|
960
1030
|
* page.runs.forEach((run) => {
|
|
961
1031
|
* console.log(run);
|
|
962
1032
|
* });
|
|
@@ -980,14 +1050,16 @@ export declare class DataClient {
|
|
|
980
1050
|
* await dataClient.createIndex(
|
|
981
1051
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
982
1052
|
* IndexableCollection.HOT_STORE,
|
|
983
|
-
* [new TextEncoder().encode(JSON.stringify({ field: 1 }))]
|
|
1053
|
+
* [new TextEncoder().encode(JSON.stringify({ field: 1 }))]
|
|
984
1054
|
* );
|
|
985
1055
|
* ```
|
|
986
1056
|
*
|
|
987
1057
|
* @param organizationId The ID of the organization
|
|
988
1058
|
* @param collectionType The type of collection to create the index on
|
|
989
|
-
* @param indexSpec The MongoDB index specification in JSON format, as a
|
|
990
|
-
*
|
|
1059
|
+
* @param indexSpec The MongoDB index specification in JSON format, as a
|
|
1060
|
+
* Uint8Array
|
|
1061
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1062
|
+
* PIPELINE_SINK
|
|
991
1063
|
*/
|
|
992
1064
|
createIndex(organizationId: string, collectionType: IndexableCollection, indexSpec: {
|
|
993
1065
|
keys: Record<string, number>;
|
|
@@ -1001,13 +1073,14 @@ export declare class DataClient {
|
|
|
1001
1073
|
* ```ts
|
|
1002
1074
|
* const indexes = await dataClient.listIndexes(
|
|
1003
1075
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
1004
|
-
* IndexableCollection.HOT_STORE
|
|
1076
|
+
* IndexableCollection.HOT_STORE
|
|
1005
1077
|
* );
|
|
1006
1078
|
* ```
|
|
1007
1079
|
*
|
|
1008
1080
|
* @param organizationId The ID of the organization
|
|
1009
1081
|
* @param collectionType The type of collection to list indexes for
|
|
1010
|
-
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1082
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1083
|
+
* PIPELINE_SINK
|
|
1011
1084
|
* @returns An array of indexes
|
|
1012
1085
|
*/
|
|
1013
1086
|
listIndexes(organizationId: string, collectionType: IndexableCollection, pipelineName?: string): Promise<Index[]>;
|
|
@@ -1020,14 +1093,15 @@ export declare class DataClient {
|
|
|
1020
1093
|
* await dataClient.deleteIndex(
|
|
1021
1094
|
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
1022
1095
|
* IndexableCollection.HOT_STORE,
|
|
1023
|
-
* 'my_index'
|
|
1096
|
+
* 'my_index'
|
|
1024
1097
|
* );
|
|
1025
1098
|
* ```
|
|
1026
1099
|
*
|
|
1027
1100
|
* @param organizationId The ID of the organization
|
|
1028
1101
|
* @param collectionType The type of collection to delete the index from
|
|
1029
1102
|
* @param indexName The name of the index to delete
|
|
1030
|
-
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1103
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1104
|
+
* PIPELINE_SINK
|
|
1031
1105
|
*/
|
|
1032
1106
|
deleteIndex(organizationId: string, collectionType: IndexableCollection, indexName: string, pipelineName?: string): Promise<void>;
|
|
1033
1107
|
/**
|
|
@@ -1046,7 +1120,7 @@ export declare class DataClient {
|
|
|
1046
1120
|
* ],
|
|
1047
1121
|
* ['tag1', 'tag2'],
|
|
1048
1122
|
* new Date('2025-01-01'),
|
|
1049
|
-
* new Date('2025-12-31')
|
|
1123
|
+
* new Date('2025-12-31')
|
|
1050
1124
|
* );
|
|
1051
1125
|
* ```
|
|
1052
1126
|
*
|
|
@@ -1089,7 +1163,7 @@ export declare class DataClient {
|
|
|
1089
1163
|
* ['tag1'],
|
|
1090
1164
|
* new Date('2025-01-01'),
|
|
1091
1165
|
* new Date('2025-12-31'),
|
|
1092
|
-
* { paths: ['resources', 'sequence_tags'] }
|
|
1166
|
+
* { paths: ['resources', 'sequence_tags'] }
|
|
1093
1167
|
* );
|
|
1094
1168
|
* ```
|
|
1095
1169
|
*
|
|
@@ -1120,7 +1194,7 @@ export declare class DataClient {
|
|
|
1120
1194
|
*
|
|
1121
1195
|
* ```ts
|
|
1122
1196
|
* const { sequences, nextPageToken } = await dataClient.listSequences(
|
|
1123
|
-
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
1197
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
1124
1198
|
* );
|
|
1125
1199
|
* ```
|
|
1126
1200
|
*
|
|
@@ -1141,7 +1215,7 @@ export declare class DataClient {
|
|
|
1141
1215
|
* ```ts
|
|
1142
1216
|
* await dataClient.addSequencesToDataset(
|
|
1143
1217
|
* ['sequence-id-1', 'sequence-id-2'],
|
|
1144
|
-
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1218
|
+
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1145
1219
|
* );
|
|
1146
1220
|
* ```
|
|
1147
1221
|
*
|
|
@@ -1157,7 +1231,7 @@ export declare class DataClient {
|
|
|
1157
1231
|
* ```ts
|
|
1158
1232
|
* await dataClient.removeSequencesFromDataset(
|
|
1159
1233
|
* ['sequence-id-1', 'sequence-id-2'],
|
|
1160
|
-
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1234
|
+
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1161
1235
|
* );
|
|
1162
1236
|
* ```
|
|
1163
1237
|
*
|
|
@@ -1171,9 +1245,8 @@ export declare class DataClient {
|
|
|
1171
1245
|
* @example
|
|
1172
1246
|
*
|
|
1173
1247
|
* ```ts
|
|
1174
|
-
* const { sequences, nextPageToken } =
|
|
1175
|
-
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1176
|
-
* );
|
|
1248
|
+
* const { sequences, nextPageToken } =
|
|
1249
|
+
* await dataClient.sequencesByDatasetID('12ab3de4f56a7bcd89ef0ab1');
|
|
1177
1250
|
* ```
|
|
1178
1251
|
*
|
|
1179
1252
|
* @param datasetId The ID of the dataset
|
|
@@ -1191,7 +1264,9 @@ export declare class DataClient {
|
|
|
1191
1264
|
* @example
|
|
1192
1265
|
*
|
|
1193
1266
|
* ```ts
|
|
1194
|
-
* const jobId = await dataClient.startSequenceDatasetExport(
|
|
1267
|
+
* const jobId = await dataClient.startSequenceDatasetExport(
|
|
1268
|
+
* '12ab3de4f56a7bcd89ef0ab1'
|
|
1269
|
+
* );
|
|
1195
1270
|
* ```
|
|
1196
1271
|
*
|
|
1197
1272
|
* @param datasetId The ID of the sequence dataset to export
|
|
@@ -1225,7 +1300,9 @@ export declare class ListDataPipelineRunsPage {
|
|
|
1225
1300
|
* @example
|
|
1226
1301
|
*
|
|
1227
1302
|
* ```ts
|
|
1228
|
-
* const page = await dataClient.listDataPipelineRuns(
|
|
1303
|
+
* const page = await dataClient.listDataPipelineRuns(
|
|
1304
|
+
* '123abc45-1234-5678-90ab-cdef12345678'
|
|
1305
|
+
* );
|
|
1229
1306
|
* const nextPage = await page.nextPage();
|
|
1230
1307
|
* ```
|
|
1231
1308
|
*
|