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