@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
package/dist/app/app-client.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import type { JsonValue } from '@bufbuild/protobuf';
|
|
2
2
|
import { Struct } from '@bufbuild/protobuf';
|
|
3
3
|
import { type Transport } from '@connectrpc/connect';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { PackageType } from '../gen/app/packages/v1/packages_pb';
|
|
5
|
+
import { APIKeyWithAuthorizations, Authorization, AuthorizedPermissions, CreateKeyFromExistingKeyAuthorizationsResponse, CreateKeyResponse, CreateModuleResponse, CreateOAuthAppUserResponse, Fragment, FragmentImportList, FragmentVisibility, GetAppContentResponse, GetAppBrandingResponse, GetRobotPartLogsResponse, GetRobotPartResponse, GetRobotPartByNameAndLocationResponse, ListOrganizationMembersResponse, Location, LocationAuth, Model, Module, Organization, OrganizationIdentity, OrganizationInvite, OrgDetails, RegistryItem, RegistryItemStatus, Robot, RobotPart, RobotPartHistoryEntry, RotateKeyResponse, RoverRentalRobot, Visibility, LocationSummary } from '../gen/app/v1/app_pb';
|
|
6
6
|
import type { LogEntry } from '../gen/common/v1/common_pb';
|
|
7
7
|
/**
|
|
8
8
|
* Creates an Authorization object from auth details.
|
|
9
9
|
*
|
|
10
10
|
* @param organizationId The ID of the organization to create the role under
|
|
11
|
-
* @param entityId The ID of the entity the role belongs to (for example a user
|
|
11
|
+
* @param entityId The ID of the entity the role belongs to (for example a user
|
|
12
|
+
* ID)
|
|
12
13
|
* @param role The role to add ("owner" or "operator")
|
|
13
|
-
* @param resourceType The type of resource to create the role for ("robot",
|
|
14
|
-
* "organization")
|
|
15
|
-
* @param identityType The type of identity that the identity ID is (for example
|
|
14
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
15
|
+
* "location", or "organization")
|
|
16
|
+
* @param identityType The type of identity that the identity ID is (for example
|
|
17
|
+
* an api-key)
|
|
16
18
|
* @param resourceId The ID of the resource the role is being created for
|
|
17
19
|
*/
|
|
18
20
|
export declare const createAuth: (organizationId: string, entityId: string, role: string, resourceType: string, identityType: string, resourceId: string) => Authorization;
|
|
@@ -21,8 +23,8 @@ export declare const createAuth: (organizationId: string, entityId: string, role
|
|
|
21
23
|
*
|
|
22
24
|
* @param organizationId The ID of the organization to create the role under
|
|
23
25
|
* @param role The role to add ("owner" or "operator")
|
|
24
|
-
* @param resourceType The type of resource to create the role for ("robot",
|
|
25
|
-
* "organization")
|
|
26
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
27
|
+
* "location", or "organization")
|
|
26
28
|
* @param resourceId The ID of the resource the role is being created for
|
|
27
29
|
*/
|
|
28
30
|
export declare const createAuthForNewAPIKey: (organizationId: string, role: string, resourceType: string, resourceId: string) => Authorization;
|
|
@@ -45,7 +47,9 @@ export declare class AppClient {
|
|
|
45
47
|
*
|
|
46
48
|
* ```ts
|
|
47
49
|
* // This method is used internally only. To obtain a user's ID, use the listOrganizationsByUser method.
|
|
48
|
-
* const members = await appClient.listOrganizationMembers(
|
|
50
|
+
* const members = await appClient.listOrganizationMembers(
|
|
51
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
52
|
+
* );
|
|
49
53
|
* ```
|
|
50
54
|
*
|
|
51
55
|
* For more information, see [App
|
|
@@ -87,7 +91,9 @@ export declare class AppClient {
|
|
|
87
91
|
*
|
|
88
92
|
* ```ts
|
|
89
93
|
* const organizations =
|
|
90
|
-
* await appClient.getOrganizationsWithAccessToLocation(
|
|
94
|
+
* await appClient.getOrganizationsWithAccessToLocation(
|
|
95
|
+
* '<YOUR-LOCATION-ID>'
|
|
96
|
+
* );
|
|
91
97
|
* ```
|
|
92
98
|
*
|
|
93
99
|
* For more information, see [App
|
|
@@ -110,7 +116,9 @@ export declare class AppClient {
|
|
|
110
116
|
* @example
|
|
111
117
|
*
|
|
112
118
|
* ```ts
|
|
113
|
-
* const organization = await appClient.getOrganization(
|
|
119
|
+
* const organization = await appClient.getOrganization(
|
|
120
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
121
|
+
* );
|
|
114
122
|
* ```
|
|
115
123
|
*
|
|
116
124
|
* For more information, see [App
|
|
@@ -126,7 +134,8 @@ export declare class AppClient {
|
|
|
126
134
|
* @example
|
|
127
135
|
*
|
|
128
136
|
* ```ts
|
|
129
|
-
* const isAvailable =
|
|
137
|
+
* const isAvailable =
|
|
138
|
+
* await appClient.getOrganizationNamespaceAvailability('name');
|
|
130
139
|
* ```
|
|
131
140
|
*
|
|
132
141
|
* For more information, see [App
|
|
@@ -144,7 +153,7 @@ export declare class AppClient {
|
|
|
144
153
|
* ```ts
|
|
145
154
|
* const organization = await appClient.updateOrganization(
|
|
146
155
|
* '<YOUR-ORGANIZATION-ID>',
|
|
147
|
-
* 'newName'
|
|
156
|
+
* 'newName'
|
|
148
157
|
* );
|
|
149
158
|
* ```
|
|
150
159
|
*
|
|
@@ -156,7 +165,8 @@ export declare class AppClient {
|
|
|
156
165
|
* @param publicNamespace Optional namespace to update the organization with
|
|
157
166
|
* @param region Optional region to update the organization with
|
|
158
167
|
* @param cid Optional CRM ID to update the organization with
|
|
159
|
-
* @param defaultFragments Optional default fragments to set for the
|
|
168
|
+
* @param defaultFragments Optional default fragments to set for the
|
|
169
|
+
* organization
|
|
160
170
|
* @returns The updated organization details
|
|
161
171
|
*/
|
|
162
172
|
updateOrganization(organizationId: string, name?: string, publicNamespace?: string, region?: string, cid?: string, defaultFragments?: FragmentImportList): Promise<Organization | undefined>;
|
|
@@ -181,14 +191,17 @@ export declare class AppClient {
|
|
|
181
191
|
* @example
|
|
182
192
|
*
|
|
183
193
|
* ```ts
|
|
184
|
-
* const members = await appClient.listOrganizationMembers(
|
|
194
|
+
* const members = await appClient.listOrganizationMembers(
|
|
195
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
196
|
+
* );
|
|
185
197
|
* ```
|
|
186
198
|
*
|
|
187
199
|
* For more information, see [App
|
|
188
200
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#listorganizationmembers).
|
|
189
201
|
*
|
|
190
202
|
* @param organizationId The id of the organization to query
|
|
191
|
-
* @returns An object containing organization members, pending invites, and
|
|
203
|
+
* @returns An object containing organization members, pending invites, and
|
|
204
|
+
* org ID
|
|
192
205
|
*/
|
|
193
206
|
listOrganizationMembers(organizationId: string): Promise<ListOrganizationMembersResponse>;
|
|
194
207
|
/**
|
|
@@ -211,7 +224,7 @@ export declare class AppClient {
|
|
|
211
224
|
* const invite = await appClient.createOrganizationInvite(
|
|
212
225
|
* '<YOUR-ORGANIZATION-ID>',
|
|
213
226
|
* 'youremail@email.com',
|
|
214
|
-
* [auth]
|
|
227
|
+
* [auth]
|
|
215
228
|
* );
|
|
216
229
|
* ```
|
|
217
230
|
*
|
|
@@ -221,8 +234,8 @@ export declare class AppClient {
|
|
|
221
234
|
* @param organizationId The id of the organization to create the invite for
|
|
222
235
|
* @param email The email address of the user to generate an invite for
|
|
223
236
|
* @param authorizations The authorizations to associate with the new invite
|
|
224
|
-
* @param sendEmailInvite Bool of whether to send an email invite (true) or
|
|
225
|
-
* user. Defaults to true
|
|
237
|
+
* @param sendEmailInvite Bool of whether to send an email invite (true) or
|
|
238
|
+
* automatically add a user. Defaults to true
|
|
226
239
|
* @returns The organization invite
|
|
227
240
|
*/
|
|
228
241
|
createOrganizationInvite(organizationId: string, email: string, authorizations: Authorization[], sendEmailInvite?: boolean): Promise<OrganizationInvite | undefined>;
|
|
@@ -246,7 +259,7 @@ export declare class AppClient {
|
|
|
246
259
|
* '<YOUR-ORGANIZATION-ID>',
|
|
247
260
|
* 'youremail@email.com',
|
|
248
261
|
* [auth],
|
|
249
|
-
* []
|
|
262
|
+
* []
|
|
250
263
|
* );
|
|
251
264
|
* ```
|
|
252
265
|
*
|
|
@@ -266,7 +279,10 @@ export declare class AppClient {
|
|
|
266
279
|
* @example
|
|
267
280
|
*
|
|
268
281
|
* ```ts
|
|
269
|
-
* await appClient.deleteOrganizationMember(
|
|
282
|
+
* await appClient.deleteOrganizationMember(
|
|
283
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
284
|
+
* '<YOUR-USER-ID>'
|
|
285
|
+
* );
|
|
270
286
|
* ```
|
|
271
287
|
*
|
|
272
288
|
* For more information, see [App
|
|
@@ -282,7 +298,10 @@ export declare class AppClient {
|
|
|
282
298
|
* @example
|
|
283
299
|
*
|
|
284
300
|
* ```ts
|
|
285
|
-
* await appClient.deleteOrganizationInvite(
|
|
301
|
+
* await appClient.deleteOrganizationInvite(
|
|
302
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
303
|
+
* 'youremail@email.com'
|
|
304
|
+
* );
|
|
286
305
|
* ```
|
|
287
306
|
*
|
|
288
307
|
* For more information, see [App
|
|
@@ -300,7 +319,7 @@ export declare class AppClient {
|
|
|
300
319
|
* ```ts
|
|
301
320
|
* const invite = await appClient.resendOrganizationInvite(
|
|
302
321
|
* '<YOUR-ORGANIZATION-ID>',
|
|
303
|
-
* 'youremail@email.com'
|
|
322
|
+
* 'youremail@email.com'
|
|
304
323
|
* );
|
|
305
324
|
* ```
|
|
306
325
|
*
|
|
@@ -318,15 +337,20 @@ export declare class AppClient {
|
|
|
318
337
|
* @example
|
|
319
338
|
*
|
|
320
339
|
* ```ts
|
|
321
|
-
* const location = await appClient.createLocation(
|
|
340
|
+
* const location = await appClient.createLocation(
|
|
341
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
342
|
+
* 'name'
|
|
343
|
+
* );
|
|
322
344
|
* ```
|
|
323
345
|
*
|
|
324
346
|
* For more information, see [App
|
|
325
347
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#createlocation).
|
|
326
348
|
*
|
|
327
|
-
* @param organizationId The ID of the organization to create the location
|
|
349
|
+
* @param organizationId The ID of the organization to create the location
|
|
350
|
+
* under
|
|
328
351
|
* @param name The name of the location to create
|
|
329
|
-
* @param parentLocationId Optional name of a parent location to create the
|
|
352
|
+
* @param parentLocationId Optional name of a parent location to create the
|
|
353
|
+
* new location under
|
|
330
354
|
* @returns The location object
|
|
331
355
|
*/
|
|
332
356
|
createLocation(organizationId: string, name: string, parentLocationId?: string): Promise<Location | undefined>;
|
|
@@ -352,7 +376,10 @@ export declare class AppClient {
|
|
|
352
376
|
* @example
|
|
353
377
|
*
|
|
354
378
|
* ```ts
|
|
355
|
-
* const location = await appClient.updateLocation(
|
|
379
|
+
* const location = await appClient.updateLocation(
|
|
380
|
+
* '<YOUR-LOCATION-ID>',
|
|
381
|
+
* 'newName'
|
|
382
|
+
* );
|
|
356
383
|
* ```
|
|
357
384
|
*
|
|
358
385
|
* For more information, see [App
|
|
@@ -360,7 +387,8 @@ export declare class AppClient {
|
|
|
360
387
|
*
|
|
361
388
|
* @param locId The ID of the location to update
|
|
362
389
|
* @param name Optional string to update the location's name to
|
|
363
|
-
* @param parentLocId Optional string to update the location's parent location
|
|
390
|
+
* @param parentLocId Optional string to update the location's parent location
|
|
391
|
+
* to
|
|
364
392
|
* @param region Optional string to update the location's region to
|
|
365
393
|
* @returns The location object
|
|
366
394
|
*/
|
|
@@ -386,7 +414,9 @@ export declare class AppClient {
|
|
|
386
414
|
* @example
|
|
387
415
|
*
|
|
388
416
|
* ```ts
|
|
389
|
-
* const locations = await appClient.listLocations(
|
|
417
|
+
* const locations = await appClient.listLocations(
|
|
418
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
419
|
+
* );
|
|
390
420
|
* ```
|
|
391
421
|
*
|
|
392
422
|
* For more information, see [App
|
|
@@ -402,7 +432,10 @@ export declare class AppClient {
|
|
|
402
432
|
* @example
|
|
403
433
|
*
|
|
404
434
|
* ```ts
|
|
405
|
-
* await appClient.shareLocation(
|
|
435
|
+
* await appClient.shareLocation(
|
|
436
|
+
* '<OTHER-ORGANIZATION-ID>',
|
|
437
|
+
* '<YOUR-LOCATION-ID>'
|
|
438
|
+
* );
|
|
406
439
|
* ```
|
|
407
440
|
*
|
|
408
441
|
* For more information, see [App
|
|
@@ -418,7 +451,10 @@ export declare class AppClient {
|
|
|
418
451
|
* @example
|
|
419
452
|
*
|
|
420
453
|
* ```ts
|
|
421
|
-
* await appClient.unshareLocation(
|
|
454
|
+
* await appClient.unshareLocation(
|
|
455
|
+
* '<OTHER-ORGANIZATION-ID>',
|
|
456
|
+
* '<YOUR-LOCATION-ID>'
|
|
457
|
+
* );
|
|
422
458
|
* ```
|
|
423
459
|
*
|
|
424
460
|
* For more information, see [App
|
|
@@ -434,7 +470,9 @@ export declare class AppClient {
|
|
|
434
470
|
* @example
|
|
435
471
|
*
|
|
436
472
|
* ```ts
|
|
437
|
-
* const locationAuth = await appClient.locationAuth(
|
|
473
|
+
* const locationAuth = await appClient.locationAuth(
|
|
474
|
+
* '<YOUR-LOCATION-ID>'
|
|
475
|
+
* );
|
|
438
476
|
* ```
|
|
439
477
|
*
|
|
440
478
|
* For more information, see [App
|
|
@@ -450,7 +488,9 @@ export declare class AppClient {
|
|
|
450
488
|
* @example
|
|
451
489
|
*
|
|
452
490
|
* ```ts
|
|
453
|
-
* const locationAuth = await appClient.createLocationSecret(
|
|
491
|
+
* const locationAuth = await appClient.createLocationSecret(
|
|
492
|
+
* '<YOUR-LOCATION-ID>'
|
|
493
|
+
* );
|
|
454
494
|
* ```
|
|
455
495
|
*
|
|
456
496
|
* For more information, see [App
|
|
@@ -466,7 +506,10 @@ export declare class AppClient {
|
|
|
466
506
|
* @example
|
|
467
507
|
*
|
|
468
508
|
* ```ts
|
|
469
|
-
* await appClient.deleteLocationSecret(
|
|
509
|
+
* await appClient.deleteLocationSecret(
|
|
510
|
+
* '<YOUR-LOCATION-ID>',
|
|
511
|
+
* '<YOUR-SECRET-ID>'
|
|
512
|
+
* );
|
|
470
513
|
* ```
|
|
471
514
|
*
|
|
472
515
|
* For more information, see [App
|
|
@@ -485,7 +528,8 @@ export declare class AppClient {
|
|
|
485
528
|
* const robot = await appClient.getRobot('<YOUR-ROBOT-ID>');
|
|
486
529
|
* ```
|
|
487
530
|
*
|
|
488
|
-
* For more information, see [App
|
|
531
|
+
* For more information, see [App
|
|
532
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#getrobot).
|
|
489
533
|
*
|
|
490
534
|
* @param id The ID of the robot
|
|
491
535
|
* @returns The `Robot` object
|
|
@@ -497,7 +541,9 @@ export declare class AppClient {
|
|
|
497
541
|
* @example
|
|
498
542
|
*
|
|
499
543
|
* ```ts
|
|
500
|
-
* const roverRentalRobots = await appClient.getRoverRentalRobots(
|
|
544
|
+
* const roverRentalRobots = await appClient.getRoverRentalRobots(
|
|
545
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
546
|
+
* );
|
|
501
547
|
* ```
|
|
502
548
|
*
|
|
503
549
|
* For more information, see [App
|
|
@@ -533,7 +579,10 @@ export declare class AppClient {
|
|
|
533
579
|
* // Get the part's address
|
|
534
580
|
* const address = robotPart.part.fqdn;
|
|
535
581
|
* // Check if machine is live (last access time less than 10 sec ago)
|
|
536
|
-
* if (
|
|
582
|
+
* if (
|
|
583
|
+
* Date.now() - Number(robotPart.part.lastAccess.seconds) * 1000 <=
|
|
584
|
+
* 10000
|
|
585
|
+
* ) {
|
|
537
586
|
* console.log('Machine is live');
|
|
538
587
|
* }
|
|
539
588
|
* ```
|
|
@@ -553,7 +602,7 @@ export declare class AppClient {
|
|
|
553
602
|
* ```ts
|
|
554
603
|
* const robotPart = await appClient.getRobotPartByNameAndLocation(
|
|
555
604
|
* '<YOUR-ROBOT-PART-NAME>',
|
|
556
|
-
* '<YOUR-LOCATION-ID>'
|
|
605
|
+
* '<YOUR-LOCATION-ID>'
|
|
557
606
|
* );
|
|
558
607
|
* ```
|
|
559
608
|
*
|
|
@@ -566,13 +615,15 @@ export declare class AppClient {
|
|
|
566
615
|
*/
|
|
567
616
|
getRobotPartByNameAndLocation(name: string, locationId: string): Promise<GetRobotPartByNameAndLocationResponse>;
|
|
568
617
|
/**
|
|
569
|
-
* Get a page of log entries for a specific robot part. Logs are sorted by
|
|
570
|
-
* first).
|
|
618
|
+
* Get a page of log entries for a specific robot part. Logs are sorted by
|
|
619
|
+
* descending time (newest first).
|
|
571
620
|
*
|
|
572
621
|
* @example
|
|
573
622
|
*
|
|
574
623
|
* ```ts
|
|
575
|
-
* const robotPartLogs = await appClient.getRobotPartLogs(
|
|
624
|
+
* const robotPartLogs = await appClient.getRobotPartLogs(
|
|
625
|
+
* '<YOUR-ROBOT-PART-ID>'
|
|
626
|
+
* );
|
|
576
627
|
* ```
|
|
577
628
|
*
|
|
578
629
|
* For more information, see [App
|
|
@@ -580,24 +631,28 @@ export declare class AppClient {
|
|
|
580
631
|
*
|
|
581
632
|
* @param id The ID of the requested robot part
|
|
582
633
|
* @param filter Optional string to filter logs on
|
|
583
|
-
* @param levels Optional array of log levels to return. Defaults to returning
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
634
|
+
* @param levels Optional array of log levels to return. Defaults to returning
|
|
635
|
+
* all log levels
|
|
636
|
+
* @param start Optional start time for log retrieval. Only logs created after
|
|
637
|
+
* this time will be returned.
|
|
638
|
+
* @param end Optional end time for log retrieval. Only logs created before
|
|
639
|
+
* this time will be returned.
|
|
640
|
+
* @param pageToken Optional string indicating which page of logs to query.
|
|
641
|
+
* Defaults to the most recent
|
|
642
|
+
* @returns The robot requested logs and the page token for the next page of
|
|
643
|
+
* logs
|
|
591
644
|
*/
|
|
592
645
|
getRobotPartLogs(id: string, filter?: string, levels?: string[], start?: Date, end?: Date, pageToken?: string): Promise<GetRobotPartLogsResponse>;
|
|
593
646
|
/**
|
|
594
|
-
* Get a stream of log entries for a specific robot part. Logs are sorted by
|
|
595
|
-
* (newest first).
|
|
647
|
+
* Get a stream of log entries for a specific robot part. Logs are sorted by
|
|
648
|
+
* descending time (newest first).
|
|
596
649
|
*
|
|
597
650
|
* @example
|
|
598
651
|
*
|
|
599
652
|
* ```ts
|
|
600
|
-
* const robotPartLogs = await appClient.tailRobotPartLogs(
|
|
653
|
+
* const robotPartLogs = await appClient.tailRobotPartLogs(
|
|
654
|
+
* '<YOUR-ROBOT-PART-ID>'
|
|
655
|
+
* );
|
|
601
656
|
* ```
|
|
602
657
|
*
|
|
603
658
|
* For more information, see [App
|
|
@@ -606,8 +661,8 @@ export declare class AppClient {
|
|
|
606
661
|
* @param id The ID of the requested robot part
|
|
607
662
|
* @param queue A queue to put the log entries into
|
|
608
663
|
* @param filter Optional string to filter logs on
|
|
609
|
-
* @param errorsOnly Optional bool to indicate whether or not only error-level
|
|
610
|
-
* returned. Defaults to true
|
|
664
|
+
* @param errorsOnly Optional bool to indicate whether or not only error-level
|
|
665
|
+
* logs should be returned. Defaults to true
|
|
611
666
|
*/
|
|
612
667
|
tailRobotPartLogs(id: string, queue: LogEntry[], filter?: string, errorsOnly?: boolean): Promise<void>;
|
|
613
668
|
/**
|
|
@@ -616,7 +671,9 @@ export declare class AppClient {
|
|
|
616
671
|
* @example
|
|
617
672
|
*
|
|
618
673
|
* ```ts
|
|
619
|
-
* const robotPartHistory = await appClient.getRobotPartHistory(
|
|
674
|
+
* const robotPartHistory = await appClient.getRobotPartHistory(
|
|
675
|
+
* '<YOUR-ROBOT-PART-ID>'
|
|
676
|
+
* );
|
|
620
677
|
* ```
|
|
621
678
|
*
|
|
622
679
|
* For more information, see [App
|
|
@@ -632,7 +689,10 @@ export declare class AppClient {
|
|
|
632
689
|
* @example
|
|
633
690
|
*
|
|
634
691
|
* ```ts
|
|
635
|
-
* const robotPart = await appClient.updateRobotPart(
|
|
692
|
+
* const robotPart = await appClient.updateRobotPart(
|
|
693
|
+
* '<YOUR-ROBOT-PART-ID>',
|
|
694
|
+
* 'newName'
|
|
695
|
+
* );
|
|
636
696
|
* ```
|
|
637
697
|
*
|
|
638
698
|
* For more information, see [App
|
|
@@ -650,7 +710,10 @@ export declare class AppClient {
|
|
|
650
710
|
* @example
|
|
651
711
|
*
|
|
652
712
|
* ```ts
|
|
653
|
-
* const robotPartId = await appClient.newRobotPart(
|
|
713
|
+
* const robotPartId = await appClient.newRobotPart(
|
|
714
|
+
* '<YOUR-ROBOT-ID>',
|
|
715
|
+
* 'newPart'
|
|
716
|
+
* );
|
|
654
717
|
* ```
|
|
655
718
|
*
|
|
656
719
|
* For more information, see [App
|
|
@@ -682,7 +745,8 @@ export declare class AppClient {
|
|
|
682
745
|
* @example
|
|
683
746
|
*
|
|
684
747
|
* ```ts
|
|
685
|
-
* const robotAPIKeys =
|
|
748
|
+
* const robotAPIKeys =
|
|
749
|
+
* await appClient.getRobotAPIKeys('<YOUR-ROBOT-ID>');
|
|
686
750
|
* ```
|
|
687
751
|
*
|
|
688
752
|
* For more information, see [App
|
|
@@ -728,7 +792,9 @@ export declare class AppClient {
|
|
|
728
792
|
* @example
|
|
729
793
|
*
|
|
730
794
|
* ```ts
|
|
731
|
-
* const robotPart = await appClient.createRobotPartSecret(
|
|
795
|
+
* const robotPart = await appClient.createRobotPartSecret(
|
|
796
|
+
* '<YOUR-ROBOT-PART-ID>'
|
|
797
|
+
* );
|
|
732
798
|
* ```
|
|
733
799
|
*
|
|
734
800
|
* For more information, see [App
|
|
@@ -744,7 +810,10 @@ export declare class AppClient {
|
|
|
744
810
|
* @example
|
|
745
811
|
*
|
|
746
812
|
* ```ts
|
|
747
|
-
* await appClient.deleteRobotPartSecret(
|
|
813
|
+
* await appClient.deleteRobotPartSecret(
|
|
814
|
+
* '<YOUR-ROBOT-PART-ID>',
|
|
815
|
+
* '<YOUR-SECRET-ID>'
|
|
816
|
+
* );
|
|
748
817
|
* ```
|
|
749
818
|
*
|
|
750
819
|
* For more information, see [App
|
|
@@ -776,10 +845,14 @@ export declare class AppClient {
|
|
|
776
845
|
* @example
|
|
777
846
|
*
|
|
778
847
|
* ```ts
|
|
779
|
-
* const robotId = await appClient.newRobot(
|
|
848
|
+
* const robotId = await appClient.newRobot(
|
|
849
|
+
* '<YOUR-LOCATION-ID>',
|
|
850
|
+
* 'newRobot'
|
|
851
|
+
* );
|
|
780
852
|
* ```
|
|
781
853
|
*
|
|
782
|
-
* For more information, see [App
|
|
854
|
+
* For more information, see [App
|
|
855
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#newrobot).
|
|
783
856
|
*
|
|
784
857
|
* @param locId The ID of the location to create the robot in
|
|
785
858
|
* @param name The name of the new robot
|
|
@@ -787,8 +860,8 @@ export declare class AppClient {
|
|
|
787
860
|
*/
|
|
788
861
|
newRobot(locId: string, name: string): Promise<string>;
|
|
789
862
|
/**
|
|
790
|
-
* Change the name of an existing machine. You can only change the name of the
|
|
791
|
-
* location.
|
|
863
|
+
* Change the name of an existing machine. You can only change the name of the
|
|
864
|
+
* machine, not the location.
|
|
792
865
|
*
|
|
793
866
|
* @example
|
|
794
867
|
*
|
|
@@ -796,7 +869,7 @@ export declare class AppClient {
|
|
|
796
869
|
* const robot = await appClient.updateRobot(
|
|
797
870
|
* '<YOUR-ROBOT-ID>',
|
|
798
871
|
* '<YOUR-LOCATION-ID>',
|
|
799
|
-
* 'newName'
|
|
872
|
+
* 'newName'
|
|
800
873
|
* );
|
|
801
874
|
* ```
|
|
802
875
|
*
|
|
@@ -830,18 +903,22 @@ export declare class AppClient {
|
|
|
830
903
|
* @example
|
|
831
904
|
*
|
|
832
905
|
* ```ts
|
|
833
|
-
* const fragments = await appClient.listFragments(
|
|
906
|
+
* const fragments = await appClient.listFragments(
|
|
907
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
908
|
+
* );
|
|
834
909
|
* ```
|
|
835
910
|
*
|
|
836
911
|
* For more information, see [App
|
|
837
912
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#listfragments).
|
|
838
913
|
*
|
|
839
914
|
* @param organizationId The ID of the organization to list fragments for
|
|
840
|
-
* @param publicOnly Optional, deprecated boolean. Use fragmentVisibilities
|
|
841
|
-
* only public fragments will be listed. Defaults to
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
*
|
|
915
|
+
* @param publicOnly Optional, deprecated boolean. Use fragmentVisibilities
|
|
916
|
+
* instead. If true then only public fragments will be listed. Defaults to
|
|
917
|
+
* true
|
|
918
|
+
* @param fragmentVisibilities Optional list of fragment visibilities to
|
|
919
|
+
* include in returned list. An empty fragmentVisibilities list defaults to
|
|
920
|
+
* normal publicOnly behavior (discludes unlisted public fragments)
|
|
921
|
+
* Otherwise, fragment visibilities should contain one of the three
|
|
845
922
|
* visibilities and takes precendence over the publicOnly field
|
|
846
923
|
* @returns The list of fragment objects
|
|
847
924
|
*/
|
|
@@ -852,7 +929,9 @@ export declare class AppClient {
|
|
|
852
929
|
* @example
|
|
853
930
|
*
|
|
854
931
|
* ```ts
|
|
855
|
-
* const fragment = await appClient.getFragment(
|
|
932
|
+
* const fragment = await appClient.getFragment(
|
|
933
|
+
* '12a12ab1-1234-5678-abcd-abcd01234567'
|
|
934
|
+
* );
|
|
856
935
|
* ```
|
|
857
936
|
*
|
|
858
937
|
* For more information, see [App
|
|
@@ -868,13 +947,17 @@ export declare class AppClient {
|
|
|
868
947
|
* @example
|
|
869
948
|
*
|
|
870
949
|
* ```ts
|
|
871
|
-
* const fragment = await appClient.createFragment(
|
|
950
|
+
* const fragment = await appClient.createFragment(
|
|
951
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
952
|
+
* 'newFragment'
|
|
953
|
+
* );
|
|
872
954
|
* ```
|
|
873
955
|
*
|
|
874
956
|
* For more information, see [App
|
|
875
957
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#createfragment).
|
|
876
958
|
*
|
|
877
|
-
* @param organizationId The ID of the organization to create the fragment
|
|
959
|
+
* @param organizationId The ID of the organization to create the fragment
|
|
960
|
+
* under
|
|
878
961
|
* @param name The name of the new fragment
|
|
879
962
|
* @param config The new fragment's config
|
|
880
963
|
* @returns The newly created fragment
|
|
@@ -888,7 +971,7 @@ export declare class AppClient {
|
|
|
888
971
|
* ```ts
|
|
889
972
|
* const fragment = await appClient.updateFragment(
|
|
890
973
|
* '12a12ab1-1234-5678-abcd-abcd01234567',
|
|
891
|
-
* 'better_name'
|
|
974
|
+
* 'better_name'
|
|
892
975
|
* );
|
|
893
976
|
* ```
|
|
894
977
|
*
|
|
@@ -898,13 +981,14 @@ export declare class AppClient {
|
|
|
898
981
|
* @param id The ID of the fragment to update
|
|
899
982
|
* @param name The name to update the fragment to
|
|
900
983
|
* @param config The config to update the fragment to
|
|
901
|
-
* @param makePublic Optional, deprecated boolean specifying whether the
|
|
902
|
-
* or not. If not passed, the visibility will be
|
|
903
|
-
* when created
|
|
904
|
-
* @param visibility Optional FragmentVisibility specifying the updated
|
|
905
|
-
* not passed, the visibility will be unchanged. If
|
|
906
|
-
*
|
|
907
|
-
*
|
|
984
|
+
* @param makePublic Optional, deprecated boolean specifying whether the
|
|
985
|
+
* fragment should be public or not. If not passed, the visibility will be
|
|
986
|
+
* unchanged. Fragments are private by default when created
|
|
987
|
+
* @param visibility Optional FragmentVisibility specifying the updated
|
|
988
|
+
* fragment visibility. If not passed, the visibility will be unchanged. If
|
|
989
|
+
* visibility is not set and makePublic is set, makePublic takes effect. If
|
|
990
|
+
* makePublic and visibility are set, they must not be conflicting. If
|
|
991
|
+
* neither is set, the fragment visibility will remain unchanged.
|
|
908
992
|
* @returns The updated fragment
|
|
909
993
|
*/
|
|
910
994
|
updateFragment(id: string, name: string, config: Struct, makePublic?: boolean, visibility?: FragmentVisibility): Promise<Fragment | undefined>;
|
|
@@ -927,19 +1011,22 @@ export declare class AppClient {
|
|
|
927
1011
|
* @example
|
|
928
1012
|
*
|
|
929
1013
|
* ```ts
|
|
930
|
-
* const fragments = await appClient.listMachineFragments(
|
|
1014
|
+
* const fragments = await appClient.listMachineFragments(
|
|
1015
|
+
* '<YOUR-MACHINE-ID>'
|
|
1016
|
+
* );
|
|
931
1017
|
* ```
|
|
932
1018
|
*
|
|
933
1019
|
* For more information, see [App
|
|
934
1020
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#listmachinefragments).
|
|
935
1021
|
*
|
|
936
|
-
* @param machineId The machine ID used to filter fragments defined in a
|
|
937
|
-
* returns any fragments nested within the fragments
|
|
938
|
-
*
|
|
939
|
-
*
|
|
940
|
-
* fragments
|
|
941
|
-
*
|
|
942
|
-
*
|
|
1022
|
+
* @param machineId The machine ID used to filter fragments defined in a
|
|
1023
|
+
* machine's parts. Also returns any fragments nested within the fragments
|
|
1024
|
+
* defined in parts.
|
|
1025
|
+
* @param additionalFragmentIds Additional fragment IDs to append to the
|
|
1026
|
+
* response. Useful when needing to view fragments that will be
|
|
1027
|
+
* provisionally added to the machine alongside existing fragments.
|
|
1028
|
+
* @returns The list of top level and nested fragments for a machine, as well
|
|
1029
|
+
* as additionally specified fragment IDs.
|
|
943
1030
|
*/
|
|
944
1031
|
listMachineFragments(machineId: string, additionalFragmentIds?: string[]): Promise<Fragment[]>;
|
|
945
1032
|
/**
|
|
@@ -953,17 +1040,19 @@ export declare class AppClient {
|
|
|
953
1040
|
* '<YOUR-USER-ID>',
|
|
954
1041
|
* 'owner',
|
|
955
1042
|
* 'robot',
|
|
956
|
-
* '<YOUR-ROBOT-ID>'
|
|
1043
|
+
* '<YOUR-ROBOT-ID>'
|
|
957
1044
|
* );
|
|
958
1045
|
* ```
|
|
959
1046
|
*
|
|
960
|
-
* For more information, see [App
|
|
1047
|
+
* For more information, see [App
|
|
1048
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#addrole).
|
|
961
1049
|
*
|
|
962
1050
|
* @param organizationId The ID of the organization to create the role under
|
|
963
|
-
* @param entityId The ID of the entity the role belongs to (for example a
|
|
1051
|
+
* @param entityId The ID of the entity the role belongs to (for example a
|
|
1052
|
+
* user ID)
|
|
964
1053
|
* @param role The role to add ("owner" or "operator")
|
|
965
|
-
* @param resourceType The type of resource to create the role for ("robot",
|
|
966
|
-
* "organization")
|
|
1054
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
1055
|
+
* "location", or "organization")
|
|
967
1056
|
* @param resourceId The ID of the resource the role is being created for
|
|
968
1057
|
*/
|
|
969
1058
|
addRole(organizationId: string, entityId: string, role: string, resourceType: string, resourceId: string): Promise<void>;
|
|
@@ -978,7 +1067,7 @@ export declare class AppClient {
|
|
|
978
1067
|
* '<YOUR-USER-ID>',
|
|
979
1068
|
* 'owner',
|
|
980
1069
|
* 'robot',
|
|
981
|
-
* '<YOUR-ROBOT-ID>'
|
|
1070
|
+
* '<YOUR-ROBOT-ID>'
|
|
982
1071
|
* );
|
|
983
1072
|
* ```
|
|
984
1073
|
*
|
|
@@ -986,10 +1075,11 @@ export declare class AppClient {
|
|
|
986
1075
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#removerole).
|
|
987
1076
|
*
|
|
988
1077
|
* @param organizationId The ID of the organization to remove the role from
|
|
989
|
-
* @param entityId The ID of the entity the role belongs to (for example a
|
|
1078
|
+
* @param entityId The ID of the entity the role belongs to (for example a
|
|
1079
|
+
* user ID)
|
|
990
1080
|
* @param role The role to remove ("owner" or "operator")
|
|
991
|
-
* @param resourceType The type of resource to remove the role from ("robot",
|
|
992
|
-
* "organization")
|
|
1081
|
+
* @param resourceType The type of resource to remove the role from ("robot",
|
|
1082
|
+
* "location", or "organization")
|
|
993
1083
|
* @param resourceId The ID of the resource the role is being removes from
|
|
994
1084
|
*/
|
|
995
1085
|
removeRole(organizationId: string, entityId: string, role: string, resourceType: string, resourceId: string): Promise<void>;
|
|
@@ -1036,8 +1126,8 @@ export declare class AppClient {
|
|
|
1036
1126
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#listauthorizations).
|
|
1037
1127
|
*
|
|
1038
1128
|
* @param organizationId The ID of the organization to list authorizations for
|
|
1039
|
-
* @param resourceIds Optional list of IDs of resources to list authorizations
|
|
1040
|
-
* provided, all resources will be included
|
|
1129
|
+
* @param resourceIds Optional list of IDs of resources to list authorizations
|
|
1130
|
+
* for. If not provided, all resources will be included
|
|
1041
1131
|
* @returns The list of authorizations
|
|
1042
1132
|
*/
|
|
1043
1133
|
listAuthorizations(organizationId: string, resourceIds?: string[]): Promise<Authorization[]>;
|
|
@@ -1057,7 +1147,9 @@ export declare class AppClient {
|
|
|
1057
1147
|
* @example
|
|
1058
1148
|
*
|
|
1059
1149
|
* ```ts
|
|
1060
|
-
* const registryItem = await appClient.getRegistryItem(
|
|
1150
|
+
* const registryItem = await appClient.getRegistryItem(
|
|
1151
|
+
* '<YOUR-REGISTRY-ITEM-ID>'
|
|
1152
|
+
* );
|
|
1061
1153
|
* ```
|
|
1062
1154
|
*
|
|
1063
1155
|
* For more information, see [App
|
|
@@ -1073,13 +1165,18 @@ export declare class AppClient {
|
|
|
1073
1165
|
* @example
|
|
1074
1166
|
*
|
|
1075
1167
|
* ```ts
|
|
1076
|
-
* await appClient.createRegistryItem(
|
|
1168
|
+
* await appClient.createRegistryItem(
|
|
1169
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
1170
|
+
* 'newRegistryItemName',
|
|
1171
|
+
* 5
|
|
1172
|
+
* );
|
|
1077
1173
|
* ```
|
|
1078
1174
|
*
|
|
1079
1175
|
* For more information, see [App
|
|
1080
1176
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#createregistryitem).
|
|
1081
1177
|
*
|
|
1082
|
-
* @param organizationId The ID of the organization to create the registry
|
|
1178
|
+
* @param organizationId The ID of the organization to create the registry
|
|
1179
|
+
* item under
|
|
1083
1180
|
* @param name The name of the registry item
|
|
1084
1181
|
* @param type The type of the item in the registry.
|
|
1085
1182
|
*/
|
|
@@ -1094,7 +1191,7 @@ export declare class AppClient {
|
|
|
1094
1191
|
* '<YOUR-REGISTRY-ITEM-ID>',
|
|
1095
1192
|
* 5, // Package: ML Model
|
|
1096
1193
|
* 'new description',
|
|
1097
|
-
* 1
|
|
1194
|
+
* 1 // Private
|
|
1098
1195
|
* );
|
|
1099
1196
|
* ```
|
|
1100
1197
|
*
|
|
@@ -1118,21 +1215,25 @@ export declare class AppClient {
|
|
|
1118
1215
|
* [], // All package types
|
|
1119
1216
|
* [1], // Private packages
|
|
1120
1217
|
* [],
|
|
1121
|
-
* [1]
|
|
1218
|
+
* [1] // Active packages
|
|
1122
1219
|
* );
|
|
1123
1220
|
* ```
|
|
1124
1221
|
*
|
|
1125
1222
|
* For more information, see [App
|
|
1126
1223
|
* API](https://docs.viam.com/dev/reference/apis/fleet/#listregistryitems).
|
|
1127
1224
|
*
|
|
1128
|
-
* @param organizationId The ID of the organization to query registry items
|
|
1225
|
+
* @param organizationId The ID of the organization to query registry items
|
|
1226
|
+
* for
|
|
1129
1227
|
* @param types A list of types to query. If empty, will not filter on type
|
|
1130
|
-
* @param visibilities A list of visibilities to query for. If empty, will not
|
|
1131
|
-
* visibility
|
|
1132
|
-
* @param platforms A list of platforms to query for. If empty, will not
|
|
1133
|
-
*
|
|
1228
|
+
* @param visibilities A list of visibilities to query for. If empty, will not
|
|
1229
|
+
* filter on visibility
|
|
1230
|
+
* @param platforms A list of platforms to query for. If empty, will not
|
|
1231
|
+
* filter on platform
|
|
1232
|
+
* @param statuses A list of statuses to query for. If empty, will not filter
|
|
1233
|
+
* on status
|
|
1134
1234
|
* @param searchTerm Optional search term to filter on
|
|
1135
|
-
* @param pageToken Optional page token for results. If not provided, will
|
|
1235
|
+
* @param pageToken Optional page token for results. If not provided, will
|
|
1236
|
+
* return all results
|
|
1136
1237
|
* @returns The list of registry items
|
|
1137
1238
|
*/
|
|
1138
1239
|
listRegistryItems(organizationId: string, types: PackageType[], visibilities: Visibility[], platforms: string[], statuses: RegistryItemStatus[], searchTerm?: string, pageToken?: string): Promise<RegistryItem[]>;
|
|
@@ -1157,7 +1258,10 @@ export declare class AppClient {
|
|
|
1157
1258
|
* @example
|
|
1158
1259
|
*
|
|
1159
1260
|
* ```ts
|
|
1160
|
-
* const module = await appClient.createModule(
|
|
1261
|
+
* const module = await appClient.createModule(
|
|
1262
|
+
* '<YOUR-ORGANIZATION-ID>',
|
|
1263
|
+
* 'newModule'
|
|
1264
|
+
* );
|
|
1161
1265
|
* ```
|
|
1162
1266
|
*
|
|
1163
1267
|
* For more information, see [App
|
|
@@ -1180,7 +1284,7 @@ export declare class AppClient {
|
|
|
1180
1284
|
* 'https://example.com',
|
|
1181
1285
|
* 'new description',
|
|
1182
1286
|
* [{ model: 'namespace:group:model1', api: 'rdk:component:generic' }],
|
|
1183
|
-
* 'entrypoint'
|
|
1287
|
+
* 'entrypoint'
|
|
1184
1288
|
* );
|
|
1185
1289
|
* ```
|
|
1186
1290
|
*
|
|
@@ -1205,7 +1309,8 @@ export declare class AppClient {
|
|
|
1205
1309
|
* const module = await appClient.getModule('<YOUR-MODULE-ID>');
|
|
1206
1310
|
* ```
|
|
1207
1311
|
*
|
|
1208
|
-
* For more information, see [App
|
|
1312
|
+
* For more information, see [App
|
|
1313
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#getmodule).
|
|
1209
1314
|
*
|
|
1210
1315
|
* @param moduleId The ID of the module
|
|
1211
1316
|
* @returns The requested module
|
|
@@ -1230,10 +1335,12 @@ export declare class AppClient {
|
|
|
1230
1335
|
/**
|
|
1231
1336
|
* Creates a new API key.
|
|
1232
1337
|
*
|
|
1233
|
-
* For more information, see [App
|
|
1338
|
+
* For more information, see [App
|
|
1339
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#createkey).
|
|
1234
1340
|
*
|
|
1235
1341
|
* @param authorizations The list of authorizations to provide for the API key
|
|
1236
|
-
* @param name An optional name for the key. If none is passed, defaults to
|
|
1342
|
+
* @param name An optional name for the key. If none is passed, defaults to
|
|
1343
|
+
* present timestamp
|
|
1237
1344
|
* @returns The new key and ID
|
|
1238
1345
|
*/
|
|
1239
1346
|
createKey(authorizations: Authorization[], name?: string): Promise<CreateKeyResponse>;
|
|
@@ -1246,7 +1353,8 @@ export declare class AppClient {
|
|
|
1246
1353
|
* await appClient.deleteKey('<YOUR-KEY-ID>');
|
|
1247
1354
|
* ```
|
|
1248
1355
|
*
|
|
1249
|
-
* For more information, see [App
|
|
1356
|
+
* For more information, see [App
|
|
1357
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#deletekey).
|
|
1250
1358
|
*
|
|
1251
1359
|
* @param id The ID of the key to delete
|
|
1252
1360
|
*/
|
|
@@ -1260,7 +1368,8 @@ export declare class AppClient {
|
|
|
1260
1368
|
* const keys = await appClient.listKeys('<YOUR-ORGANIZATION-ID>');
|
|
1261
1369
|
* ```
|
|
1262
1370
|
*
|
|
1263
|
-
* For more information, see [App
|
|
1371
|
+
* For more information, see [App
|
|
1372
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#listkeys).
|
|
1264
1373
|
*
|
|
1265
1374
|
* @param orgId The ID of the organization to query
|
|
1266
1375
|
* @returns The list of API keys
|
|
@@ -1275,7 +1384,8 @@ export declare class AppClient {
|
|
|
1275
1384
|
* const key = await appClient.rotateKey('<YOUR-KEY-ID>');
|
|
1276
1385
|
* ```
|
|
1277
1386
|
*
|
|
1278
|
-
* For more information, see [App
|
|
1387
|
+
* For more information, see [App
|
|
1388
|
+
* API](https://docs.viam.com/dev/reference/apis/fleet/#rotatekey).
|
|
1279
1389
|
*
|
|
1280
1390
|
* @param id The ID of the key to rotate
|
|
1281
1391
|
* @returns The updated key and ID
|
|
@@ -1287,7 +1397,10 @@ export declare class AppClient {
|
|
|
1287
1397
|
* @example
|
|
1288
1398
|
*
|
|
1289
1399
|
* ```ts
|
|
1290
|
-
* const key =
|
|
1400
|
+
* const key =
|
|
1401
|
+
* await appClient.createKeyFromExistingKeyAuthorizations(
|
|
1402
|
+
* '<YOUR-KEY-ID>'
|
|
1403
|
+
* );
|
|
1291
1404
|
* ```
|
|
1292
1405
|
*
|
|
1293
1406
|
* For more information, see [App
|
|
@@ -1305,7 +1418,7 @@ export declare class AppClient {
|
|
|
1305
1418
|
* ```ts
|
|
1306
1419
|
* const appContent = await appClient.getAppContent(
|
|
1307
1420
|
* '<YOUR-PUBLIC-NAMESPACE>',
|
|
1308
|
-
* '<YOUR-APP-NAME>'
|
|
1421
|
+
* '<YOUR-APP-NAME>'
|
|
1309
1422
|
* );
|
|
1310
1423
|
* ```
|
|
1311
1424
|
*
|
|
@@ -1323,7 +1436,9 @@ export declare class AppClient {
|
|
|
1323
1436
|
* @example
|
|
1324
1437
|
*
|
|
1325
1438
|
* ```ts
|
|
1326
|
-
* const metadata = await appClient.getOrganizationMetadata(
|
|
1439
|
+
* const metadata = await appClient.getOrganizationMetadata(
|
|
1440
|
+
* '<YOUR-ORGANIZATION-ID>'
|
|
1441
|
+
* );
|
|
1327
1442
|
* ```
|
|
1328
1443
|
*
|
|
1329
1444
|
* For more information, see [App
|
|
@@ -1357,7 +1472,9 @@ export declare class AppClient {
|
|
|
1357
1472
|
* @example
|
|
1358
1473
|
*
|
|
1359
1474
|
* ```ts
|
|
1360
|
-
* const metadata = await appClient.getLocationMetadata(
|
|
1475
|
+
* const metadata = await appClient.getLocationMetadata(
|
|
1476
|
+
* '<YOUR-LOCATION-ID>'
|
|
1477
|
+
* );
|
|
1361
1478
|
* ```
|
|
1362
1479
|
*
|
|
1363
1480
|
* For more information, see [App
|
|
@@ -1425,7 +1542,9 @@ export declare class AppClient {
|
|
|
1425
1542
|
* @example
|
|
1426
1543
|
*
|
|
1427
1544
|
* ```ts
|
|
1428
|
-
* const metadata = await appClient.getRobotPartMetadata(
|
|
1545
|
+
* const metadata = await appClient.getRobotPartMetadata(
|
|
1546
|
+
* '<YOUR-ROBOT-PART-ID>'
|
|
1547
|
+
* );
|
|
1429
1548
|
* ```
|
|
1430
1549
|
*
|
|
1431
1550
|
* For more information, see [App
|
|
@@ -1461,7 +1580,7 @@ export declare class AppClient {
|
|
|
1461
1580
|
* ```ts
|
|
1462
1581
|
* const branding = await appClient.getAppBranding(
|
|
1463
1582
|
* '<YOUR-PUBLIC-NAMESPACE>',
|
|
1464
|
-
* '<YOUR-APP-NAME>'
|
|
1583
|
+
* '<YOUR-APP-NAME>'
|
|
1465
1584
|
* );
|
|
1466
1585
|
* ```
|
|
1467
1586
|
*
|
|
@@ -1474,13 +1593,18 @@ export declare class AppClient {
|
|
|
1474
1593
|
*/
|
|
1475
1594
|
getAppBranding(publicNamespace: string, name: string): Promise<GetAppBrandingResponse>;
|
|
1476
1595
|
/**
|
|
1477
|
-
* Lists machine summaries for an organization, optionally filtered by
|
|
1478
|
-
* and limit.
|
|
1596
|
+
* Lists machine summaries for an organization, optionally filtered by
|
|
1597
|
+
* fragment IDs, location IDs, and limit.
|
|
1479
1598
|
*
|
|
1480
1599
|
* @example
|
|
1481
1600
|
*
|
|
1482
1601
|
* ```ts
|
|
1483
|
-
* const summaries = await appClient.listMachineSummaries(
|
|
1602
|
+
* const summaries = await appClient.listMachineSummaries(
|
|
1603
|
+
* 'orgId',
|
|
1604
|
+
* ['frag1'],
|
|
1605
|
+
* ['loc1'],
|
|
1606
|
+
* 10
|
|
1607
|
+
* );
|
|
1484
1608
|
* ```
|
|
1485
1609
|
*
|
|
1486
1610
|
* @param organizationId The ID of the organization
|
|
@@ -1502,7 +1626,7 @@ export declare class AppClient {
|
|
|
1502
1626
|
* 'user@example.com',
|
|
1503
1627
|
* 'First',
|
|
1504
1628
|
* 'Last',
|
|
1505
|
-
* 'password'
|
|
1629
|
+
* 'password'
|
|
1506
1630
|
* );
|
|
1507
1631
|
* ```
|
|
1508
1632
|
*
|