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