@viamrobotics/sdk 0.52.1 → 0.52.2
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/data-client.d.ts +69 -4
- package/dist/main.d.ts +4 -4
- package/dist/main.es.js +225 -142
- package/dist/main.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JsonValue } from '@bufbuild/protobuf';
|
|
2
2
|
import { type Client, type Transport } from '@connectrpc/connect';
|
|
3
|
-
import { BinaryID, CaptureMetadata, Filter, Order, TabularDataSource, TabularDataSourceType } from '../gen/app/data/v1/data_pb';
|
|
3
|
+
import { BinaryID, CaptureMetadata, Filter, Index, IndexableCollection, Order, TabularDataSource, TabularDataSourceType } from '../gen/app/data/v1/data_pb';
|
|
4
4
|
import { DataPipelinesService } from '../gen/app/datapipelines/v1/data_pipelines_connect';
|
|
5
5
|
import { DataPipeline, DataPipelineRun } from '../gen/app/datapipelines/v1/data_pipelines_pb';
|
|
6
6
|
import type { Dataset as PBDataset } from '../gen/app/dataset/v1/dataset_pb';
|
|
@@ -68,7 +68,7 @@ export declare class DataClient {
|
|
|
68
68
|
private datasetClient;
|
|
69
69
|
private dataSyncClient;
|
|
70
70
|
private dataPipelinesClient;
|
|
71
|
-
static readonly UPLOAD_CHUNK_SIZE
|
|
71
|
+
static readonly UPLOAD_CHUNK_SIZE: number;
|
|
72
72
|
constructor(transport: Transport);
|
|
73
73
|
/**
|
|
74
74
|
* Obtain unified tabular data and metadata from the specified data source.
|
|
@@ -155,9 +155,10 @@ export declare class DataClient {
|
|
|
155
155
|
* store. Defaults to false. Deprecated - use dataSource instead.
|
|
156
156
|
* @param dataSource The data source to query. Defaults to the standard data
|
|
157
157
|
* source.
|
|
158
|
+
* @param queryPrefixName Optional name of the query prefix.
|
|
158
159
|
* @returns An array of data objects
|
|
159
160
|
*/
|
|
160
|
-
tabularDataByMQL(organizationId: string, query: Uint8Array[] | Record<string, Date | JsonValue>[], useRecentData?: boolean, tabularDataSource?: TabularDataSource): Promise<(Object | any[])[]>;
|
|
161
|
+
tabularDataByMQL(organizationId: string, query: Uint8Array[] | Record<string, Date | JsonValue>[], useRecentData?: boolean, tabularDataSource?: TabularDataSource, queryPrefixName?: string): Promise<(Object | any[])[]>;
|
|
161
162
|
/**
|
|
162
163
|
* Filter and get a page of tabular data. The returned metadata might be empty
|
|
163
164
|
* if the metadata index of the data is out of the bounds of the returned
|
|
@@ -910,6 +911,7 @@ export declare class DataClient {
|
|
|
910
911
|
* @param query The MQL query to run as a list of BSON documents
|
|
911
912
|
* @param schedule The schedule to run the query on (cron expression)
|
|
912
913
|
* @param dataSourceType The type of data source to use for the data pipeline
|
|
914
|
+
* @param enableBackfill Whether to enable backfill for the data pipeline
|
|
913
915
|
* @returns The ID of the created data pipeline
|
|
914
916
|
*/
|
|
915
917
|
createDataPipeline(organizationId: string, name: string, query: Uint8Array[] | Record<string, Date | JsonValue>[], schedule: string, enableBackfill: boolean, dataSourceType?: TabularDataSourceType): Promise<string>;
|
|
@@ -950,6 +952,69 @@ export declare class DataClient {
|
|
|
950
952
|
* @returns A page of data pipeline runs
|
|
951
953
|
*/
|
|
952
954
|
listDataPipelineRuns(pipelineId: string, pageSize?: number): Promise<ListDataPipelineRunsPage>;
|
|
955
|
+
/**
|
|
956
|
+
* CreateIndex starts a custom index build
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
*
|
|
960
|
+
* ```ts
|
|
961
|
+
* await dataClient.createIndex(
|
|
962
|
+
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
963
|
+
* IndexableCollection.HOT_STORE,
|
|
964
|
+
* [new TextEncoder().encode(JSON.stringify({ field: 1 }))]
|
|
965
|
+
* );
|
|
966
|
+
* ```
|
|
967
|
+
*
|
|
968
|
+
* @param organizationId The ID of the organization
|
|
969
|
+
* @param collectionType The type of collection to create the index on
|
|
970
|
+
* @param indexSpec The MongoDB index specification in JSON format, as a
|
|
971
|
+
* Uint8Array
|
|
972
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
973
|
+
* PIPELINE_SINK
|
|
974
|
+
*/
|
|
975
|
+
createIndex(organizationId: string, collectionType: IndexableCollection, indexSpec: {
|
|
976
|
+
keys: Record<string, number>;
|
|
977
|
+
options?: Record<string, unknown>;
|
|
978
|
+
}, pipelineName?: string): Promise<void>;
|
|
979
|
+
/**
|
|
980
|
+
* ListIndexes returns all the indexes for a given collection
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
*
|
|
984
|
+
* ```ts
|
|
985
|
+
* const indexes = await dataClient.listIndexes(
|
|
986
|
+
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
987
|
+
* IndexableCollection.HOT_STORE
|
|
988
|
+
* );
|
|
989
|
+
* ```
|
|
990
|
+
*
|
|
991
|
+
* @param organizationId The ID of the organization
|
|
992
|
+
* @param collectionType The type of collection to list indexes for
|
|
993
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
994
|
+
* PIPELINE_SINK
|
|
995
|
+
* @returns An array of indexes
|
|
996
|
+
*/
|
|
997
|
+
listIndexes(organizationId: string, collectionType: IndexableCollection, pipelineName?: string): Promise<Index[]>;
|
|
998
|
+
/**
|
|
999
|
+
* DeleteIndex drops the specified custom index from a collection
|
|
1000
|
+
*
|
|
1001
|
+
* @example
|
|
1002
|
+
*
|
|
1003
|
+
* ```ts
|
|
1004
|
+
* await dataClient.deleteIndex(
|
|
1005
|
+
* '123abc45-1234-5678-90ab-cdef12345678',
|
|
1006
|
+
* IndexableCollection.HOT_STORE,
|
|
1007
|
+
* 'my_index'
|
|
1008
|
+
* );
|
|
1009
|
+
* ```
|
|
1010
|
+
*
|
|
1011
|
+
* @param organizationId The ID of the organization
|
|
1012
|
+
* @param collectionType The type of collection to delete the index from
|
|
1013
|
+
* @param indexName The name of the index to delete
|
|
1014
|
+
* @param pipelineName Optional name of the pipeline if collectionType is
|
|
1015
|
+
* PIPELINE_SINK
|
|
1016
|
+
*/
|
|
1017
|
+
deleteIndex(organizationId: string, collectionType: IndexableCollection, indexName: string, pipelineName?: string): Promise<void>;
|
|
953
1018
|
}
|
|
954
1019
|
export declare class ListDataPipelineRunsPage {
|
|
955
1020
|
private readonly dataPipelinesClient;
|
|
@@ -974,5 +1039,5 @@ export declare class ListDataPipelineRunsPage {
|
|
|
974
1039
|
*/
|
|
975
1040
|
nextPage(): Promise<ListDataPipelineRunsPage>;
|
|
976
1041
|
}
|
|
977
|
-
export { type BinaryID, type Order } from '../gen/app/data/v1/data_pb';
|
|
1042
|
+
export { type BinaryID, type IndexableCollection, type Order, } from '../gen/app/data/v1/data_pb';
|
|
978
1043
|
export { type UploadMetadata } from '../gen/app/datasync/v1/data_sync_pb';
|
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const version: string;
|
|
2
|
-
export { RobotClient
|
|
2
|
+
export { RobotClient as Client, createRobotClient, RobotClient, type CloudMetadata, type DialConf, type DialDirectConf, type DialWebRTCConf, type Robot, } from './robot';
|
|
3
3
|
/**
|
|
4
4
|
* Raw Protobuf interfaces for a Robot component.
|
|
5
5
|
*
|
|
@@ -10,8 +10,8 @@ export { RobotClient, RobotClient as Client, createRobotClient, type CloudMetada
|
|
|
10
10
|
*/
|
|
11
11
|
export * as robotApi from './gen/robot/v1/robot_pb';
|
|
12
12
|
export { createViamClient, type ViamClient, type ViamClientOptions, } from './app/viam-client';
|
|
13
|
-
export { type AccessToken, type Credential, type
|
|
14
|
-
export { type BinaryID, type DataClient, type FilterOptions, } from './app/data-client';
|
|
13
|
+
export { type AccessToken, type Credential, type Credentials, type CredentialType, } from './app/viam-transport';
|
|
14
|
+
export { type BinaryID, type DataClient, type FilterOptions, type IndexableCollection, } from './app/data-client';
|
|
15
15
|
/**
|
|
16
16
|
* Raw Protobuf interfaces for Data.
|
|
17
17
|
*
|
|
@@ -142,7 +142,7 @@ export { GantryClient, type Gantry } from './components/gantry';
|
|
|
142
142
|
* @group Raw Protobufs
|
|
143
143
|
*/
|
|
144
144
|
export * as gantryApi from './gen/component/gantry/v1/gantry_pb';
|
|
145
|
-
export { MLModelClient, type
|
|
145
|
+
export { MLModelClient, type FlatTensors, type Metadata, type MLModel, type TensorInfo, } from './services/ml-model';
|
|
146
146
|
export { MotorClient, type Motor } from './components/motor';
|
|
147
147
|
/**
|
|
148
148
|
* Raw Protobuf interfaces for a Motor component.
|