@viamrobotics/sdk 0.15.0 → 0.16.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 +583 -0
- package/dist/app/data-client.d.ts +292 -14
- package/dist/app/viam-client.d.ts +2 -0
- package/dist/events.d.ts +10 -2
- package/dist/gen/app/agent/v1/agent_pb.d.ts +0 -148
- package/dist/gen/app/agent/v1/agent_pb_service.d.ts +0 -48
- package/dist/gen/app/v1/billing_pb.d.ts +12 -0
- package/dist/gen/common/v1/common_pb.d.ts +0 -62
- package/dist/gen/component/board/v1/board_pb.d.ts +25 -39
- package/dist/gen/component/board/v1/board_pb_service.d.ts +0 -19
- package/dist/gen/service/shell/v1/shell_pb.d.ts +283 -0
- package/dist/gen/service/shell/v1/shell_pb_service.d.ts +22 -0
- package/dist/gen/service/vision/v1/vision_pb.d.ts +147 -0
- package/dist/gen/service/vision/v1/vision_pb_service.d.ts +38 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.es.js +47910 -30182
- package/dist/main.umd.js +19 -19
- package/dist/robot/robot.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import * as pb from '../gen/app/v1/app_pb';
|
|
2
|
+
import { type LogEntry } from '../gen/common/v1/common_pb';
|
|
3
|
+
import { type RpcOptions } from '@improbable-eng/grpc-web/dist/typings/client.d';
|
|
4
|
+
import type { StructType } from '../types';
|
|
5
|
+
import { type PackageTypeMap } from '../gen/app/packages/v1/packages_pb';
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Authorization object from auth details.
|
|
8
|
+
*
|
|
9
|
+
* @param orgId The ID of the organization to create the role under
|
|
10
|
+
* @param entityId The ID of the entity the role belongs to (e.g., a user ID)
|
|
11
|
+
* @param role The role to add ("owner" or "operator")
|
|
12
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
13
|
+
* "location", or "organization")
|
|
14
|
+
* @param identityType The type of identity that the identity ID is (e.g., an
|
|
15
|
+
* api-key)
|
|
16
|
+
* @param resourceId The ID of the resource the role is being created for
|
|
17
|
+
*/
|
|
18
|
+
export declare const createAuth: (orgId: string, entityId: string, role: string, resourceType: string, identityType: string, resourceId: string) => pb.Authorization;
|
|
19
|
+
/**
|
|
20
|
+
* Creates an Authorization object specifically for a new API key.
|
|
21
|
+
*
|
|
22
|
+
* @param orgId The ID of the organization to create the role under
|
|
23
|
+
* @param role The role to add ("owner" or "operator")
|
|
24
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
25
|
+
* "location", or "organization")
|
|
26
|
+
* @param resourceId The ID of the resource the role is being created for
|
|
27
|
+
*/
|
|
28
|
+
export declare const createAuthForNewAPIKey: (orgId: string, role: string, resourceType: string, resourceId: string) => pb.Authorization;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new AuthorizedPermissions object
|
|
31
|
+
*
|
|
32
|
+
* @param resourceType The type of the resource to check permissions for
|
|
33
|
+
* @param resourceId The ID of the resource to check permissions for
|
|
34
|
+
* @param permissions A list of permissions to check
|
|
35
|
+
* @returns The AuthorizedPermissions object
|
|
36
|
+
*/
|
|
37
|
+
export declare const createPermission: (resourceType: string, resourceId: string, permissions: string[]) => pb.AuthorizedPermissions;
|
|
38
|
+
export declare class AppClient {
|
|
39
|
+
private service;
|
|
40
|
+
constructor(serviceHost: string, grpcOptions: RpcOptions);
|
|
41
|
+
/**
|
|
42
|
+
* Obain a user's ID from their email address.
|
|
43
|
+
*
|
|
44
|
+
* @param email The email address of the user
|
|
45
|
+
* @returns The user's ID
|
|
46
|
+
*/
|
|
47
|
+
getUserIDByEmail(email: string): Promise<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Create a new organization.
|
|
50
|
+
*
|
|
51
|
+
* @param name The name of the new organization
|
|
52
|
+
* @returns The new organization
|
|
53
|
+
*/
|
|
54
|
+
createOrganization(name: string): Promise<pb.Organization.AsObject | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* List all organizations.
|
|
57
|
+
*
|
|
58
|
+
* @returns The organization list
|
|
59
|
+
*/
|
|
60
|
+
listOrganizations(): Promise<pb.Organization.AsObject[]>;
|
|
61
|
+
/**
|
|
62
|
+
* List all organizations with access to a particular location.
|
|
63
|
+
*
|
|
64
|
+
* @param locationId The ID of the location to query
|
|
65
|
+
* @returns The list of locations with access to the requested location
|
|
66
|
+
*/
|
|
67
|
+
getOrganizationsWithAccessToLocation(locationId: string): Promise<pb.OrganizationIdentity.AsObject[]>;
|
|
68
|
+
/**
|
|
69
|
+
* List all organizations associated with a user.
|
|
70
|
+
*
|
|
71
|
+
* @param userId The ID of the user to query
|
|
72
|
+
* @returns The list of locations the requested user has access to
|
|
73
|
+
*/
|
|
74
|
+
listOrganizationsByUser(userId: string): Promise<pb.OrgDetails.AsObject[]>;
|
|
75
|
+
/**
|
|
76
|
+
* Get details about an organization.
|
|
77
|
+
*
|
|
78
|
+
* @param orgId The ID of the organization
|
|
79
|
+
* @returns Details about the organization, if it exists
|
|
80
|
+
*/
|
|
81
|
+
getOrganization(orgId: string): Promise<pb.GetOrganizationResponse.AsObject>;
|
|
82
|
+
/**
|
|
83
|
+
* Find out if an organization namespace is available.
|
|
84
|
+
*
|
|
85
|
+
* @param namespace The namespace to query for availability
|
|
86
|
+
* @returns A boolean indicating whether or not the namespace is available
|
|
87
|
+
*/
|
|
88
|
+
getOrganizationNamespaceAvailability(namespace: string): Promise<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Updates organization details.
|
|
91
|
+
*
|
|
92
|
+
* @param orgId The id of the organization to update
|
|
93
|
+
* @param name Optional name to update the organization with
|
|
94
|
+
* @param publicNamespace Optional namespace to update the organization with
|
|
95
|
+
* @param region Optional region to update the organization with
|
|
96
|
+
* @param cid Optional CRM ID to update the organization with
|
|
97
|
+
* @returns The updated organization details
|
|
98
|
+
*/
|
|
99
|
+
updateOrganization(orgId: string, name?: string, publicNamespace?: string, region?: string, cid?: string): Promise<pb.Organization.AsObject | undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* Deletes an organization.
|
|
102
|
+
*
|
|
103
|
+
* @param orgId The id of the organization to delete
|
|
104
|
+
*/
|
|
105
|
+
deleteOrganization(orgId: string): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Lists organization memebers and outstanding invites.
|
|
108
|
+
*
|
|
109
|
+
* @param orgId The id of the organization to query
|
|
110
|
+
* @returns An object containing organization members, pending invites, and
|
|
111
|
+
* org ID
|
|
112
|
+
*/
|
|
113
|
+
listOrganizationMembers(orgId: string): Promise<pb.ListOrganizationMembersResponse.AsObject>;
|
|
114
|
+
/**
|
|
115
|
+
* Creates a new invitation to join an organization.
|
|
116
|
+
*
|
|
117
|
+
* @param orgId The id of the organization to create the invite for
|
|
118
|
+
* @param email The email address of the user to generate an invite for
|
|
119
|
+
* @param authorizations The authorizations to associate with the new invite
|
|
120
|
+
* @param sendEmailInvite Bool of whether to send an email invite (true) or
|
|
121
|
+
* automatically add a user. Defaults to true
|
|
122
|
+
* @returns The organization invite
|
|
123
|
+
*/
|
|
124
|
+
createOrganizationInvite(orgId: string, email: string, authorizations: pb.Authorization[], sendEmailInvite?: boolean): Promise<pb.CreateOrganizationInviteResponse.AsObject>;
|
|
125
|
+
/**
|
|
126
|
+
* Updates authorizations for an existing org invite.
|
|
127
|
+
*
|
|
128
|
+
* @param orgId The id of the organization
|
|
129
|
+
* @param email The email address associated with the invite
|
|
130
|
+
* @param addAuthsList List of authorizations to add to the invite
|
|
131
|
+
* @param removeAuthsList List of authorizations to remove from the invite
|
|
132
|
+
* @returns The organization invite
|
|
133
|
+
*/
|
|
134
|
+
updateOrganizationInviteAuthorizations(orgId: string, email: string, addAuthsList: pb.Authorization[], removeAuthsList: pb.Authorization[]): Promise<pb.UpdateOrganizationInviteAuthorizationsResponse.AsObject>;
|
|
135
|
+
/**
|
|
136
|
+
* Removes a member from an organization.
|
|
137
|
+
*
|
|
138
|
+
* @param orgId The ID of the organization
|
|
139
|
+
* @param userId The ID of the user
|
|
140
|
+
*/
|
|
141
|
+
deleteOrganizationMember(orgId: string, userId: string): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Deletes a pending organization invite.
|
|
144
|
+
*
|
|
145
|
+
* @param orgId The ID of the organization
|
|
146
|
+
* @param email The email associated with the invite to delete
|
|
147
|
+
*/
|
|
148
|
+
deleteOrganizationInvite(orgId: string, email: string): Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Resends a pending organization invite.
|
|
151
|
+
*
|
|
152
|
+
* @param orgId The ID of the organization
|
|
153
|
+
* @param email The email associated with the invite to resend
|
|
154
|
+
* @returns The invite
|
|
155
|
+
*/
|
|
156
|
+
resendOrganizationInvite(orgId: string, email: string): Promise<pb.ResendOrganizationInviteResponse.AsObject>;
|
|
157
|
+
/**
|
|
158
|
+
* Creates a new location.
|
|
159
|
+
*
|
|
160
|
+
* @param orgId The ID of the organization to create the location under
|
|
161
|
+
* @param name The name of the location to create
|
|
162
|
+
* @param parentLocationId Optional name of a parent location to create the
|
|
163
|
+
* new location under
|
|
164
|
+
* @returns The location object
|
|
165
|
+
*/
|
|
166
|
+
createLocation(orgId: string, name: string, parentLocationId?: string): Promise<pb.CreateLocationResponse.AsObject>;
|
|
167
|
+
/**
|
|
168
|
+
* Looks up a location.
|
|
169
|
+
*
|
|
170
|
+
* @param locId The ID of the location to query.
|
|
171
|
+
* @returns The location object
|
|
172
|
+
*/
|
|
173
|
+
getLocation(locId: string): Promise<pb.GetLocationResponse.AsObject>;
|
|
174
|
+
/**
|
|
175
|
+
* Updates location details.
|
|
176
|
+
*
|
|
177
|
+
* @param locId The ID of the location to update
|
|
178
|
+
* @param name Optional string to update the location's name to
|
|
179
|
+
* @param parentLocId Optional string to update the location's parent location
|
|
180
|
+
* to
|
|
181
|
+
* @param region Optional string to update the location's region to
|
|
182
|
+
* @returns The location object
|
|
183
|
+
*/
|
|
184
|
+
updateLocation(locId: string, name?: string, parentLocId?: string, region?: string): Promise<pb.UpdateLocationResponse.AsObject>;
|
|
185
|
+
/**
|
|
186
|
+
* Deletes a location
|
|
187
|
+
*
|
|
188
|
+
* @param locId The ID of the location to delete
|
|
189
|
+
*/
|
|
190
|
+
deleteLocation(locId: string): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Lists all locations under an organization.
|
|
193
|
+
*
|
|
194
|
+
* @param orgId The ID of the organization to query
|
|
195
|
+
* @returns A list of locations under the organization
|
|
196
|
+
*/
|
|
197
|
+
listLocations(orgId: string): Promise<pb.Location.AsObject[]>;
|
|
198
|
+
/**
|
|
199
|
+
* Shares a location with another organization
|
|
200
|
+
*
|
|
201
|
+
* @param orgId The ID of the organization to share with
|
|
202
|
+
* @param locId The ID of the location to share
|
|
203
|
+
*/
|
|
204
|
+
shareLocation(orgId: string, locId: string): Promise<void>;
|
|
205
|
+
/**
|
|
206
|
+
* Unshares a location with an organization
|
|
207
|
+
*
|
|
208
|
+
* @param orgId The ID of the organization to unshare with
|
|
209
|
+
* @param locId The ID of the location to unshare
|
|
210
|
+
*/
|
|
211
|
+
unshareLocation(orgId: string, locId: string): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Get a location's `LocationAuth` (location secret(s)).
|
|
214
|
+
*
|
|
215
|
+
* @param locId The ID of the location to retrieve `LocationAuth` from.
|
|
216
|
+
* @returns The `LocationAuth` for the requested location.
|
|
217
|
+
*/
|
|
218
|
+
locationAuth(locId: string): Promise<pb.LocationAuthResponse.AsObject>;
|
|
219
|
+
/**
|
|
220
|
+
* Create a location secret (`LocationAuth`).
|
|
221
|
+
*
|
|
222
|
+
* @param locId The ID of the location to create a `LocationAuth` for
|
|
223
|
+
* @returns The newly created `LocationAuth`
|
|
224
|
+
*/
|
|
225
|
+
createLocationSecret(locId: string): Promise<pb.CreateLocationSecretResponse.AsObject>;
|
|
226
|
+
/**
|
|
227
|
+
* Deletes a location secret (`LocationAuth`).
|
|
228
|
+
*
|
|
229
|
+
* @param locId The ID of the location to delete the `LocationAuth` from
|
|
230
|
+
* @param secretId The ID of the location secret to delete
|
|
231
|
+
*/
|
|
232
|
+
deleteLocationSecret(locId: string, secretId: string): Promise<void>;
|
|
233
|
+
/**
|
|
234
|
+
* Queries a robot by its ID.
|
|
235
|
+
*
|
|
236
|
+
* @param id The ID of the robot
|
|
237
|
+
* @returns The `Robot` object
|
|
238
|
+
*/
|
|
239
|
+
getRobot(id: string): Promise<pb.GetRobotResponse.AsObject>;
|
|
240
|
+
/**
|
|
241
|
+
* Returns a list of rover rental robots for an organization.
|
|
242
|
+
*
|
|
243
|
+
* @param orgId The ID of the organization to query
|
|
244
|
+
* @returns The list of `RoverRentalRobot` objects
|
|
245
|
+
*/
|
|
246
|
+
getRoverRentalRobots(orgId: string): Promise<pb.RoverRentalRobot.AsObject[]>;
|
|
247
|
+
/**
|
|
248
|
+
* Returns a list of parts for a given robot
|
|
249
|
+
*
|
|
250
|
+
* @param robotId The ID of the robot to query
|
|
251
|
+
* @returns The list of `RobotPart` objects associated with the robot
|
|
252
|
+
*/
|
|
253
|
+
getRobotParts(robotId: string): Promise<pb.RobotPart.AsObject[]>;
|
|
254
|
+
/**
|
|
255
|
+
* Queries a specific robot part by ID.
|
|
256
|
+
*
|
|
257
|
+
* @param id The ID of the requested robot part
|
|
258
|
+
* @returns The robot part and a its json config
|
|
259
|
+
*/
|
|
260
|
+
getRobotPart(id: string): Promise<pb.GetRobotPartResponse.AsObject>;
|
|
261
|
+
/**
|
|
262
|
+
* Get a page of log entries for a specific robot part. Logs are sorted by
|
|
263
|
+
* descending time (newest first).
|
|
264
|
+
*
|
|
265
|
+
* @param id The ID of the requested robot part
|
|
266
|
+
* @param filter Optional string to filter logs on
|
|
267
|
+
* @param levels Optional array of log levels to return. Defaults to returning
|
|
268
|
+
* all log levels
|
|
269
|
+
* @param pageToken Optional string indicating which page of logs to query.
|
|
270
|
+
* Defaults to the most recent
|
|
271
|
+
* @returns The robot requested logs and the page token for the next page of
|
|
272
|
+
* logs
|
|
273
|
+
*/
|
|
274
|
+
getRobotPartLogs(id: string, filter?: string, levels?: string[], pageToken?: string): Promise<pb.GetRobotPartLogsResponse.AsObject>;
|
|
275
|
+
/**
|
|
276
|
+
* Get a stream of log entries for a specific robot part. Logs are sorted by
|
|
277
|
+
* descending time (newest first).
|
|
278
|
+
*
|
|
279
|
+
* @param id The ID of the requested robot part
|
|
280
|
+
* @param queue A queue to put the log entries into
|
|
281
|
+
* @param filter Optional string to filter logs on
|
|
282
|
+
* @param errorsOnly Optional bool to indicate whether or not only error-level
|
|
283
|
+
* logs should be returned. Defaults to true
|
|
284
|
+
*/
|
|
285
|
+
tailRobotPartLogs(id: string, queue: LogEntry.AsObject[], filter?: string, errorsOnly?: boolean): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Get a list containing the history of a robot part.
|
|
288
|
+
*
|
|
289
|
+
* @param id The ID of the requested robot part
|
|
290
|
+
* @returns The list of the robot part's history
|
|
291
|
+
*/
|
|
292
|
+
getRobotPartHistory(id: string): Promise<pb.RobotPartHistoryEntry.AsObject[]>;
|
|
293
|
+
/**
|
|
294
|
+
* Updates a robot part based on its ID.
|
|
295
|
+
*
|
|
296
|
+
* @param id The ID of the requested robot part
|
|
297
|
+
* @param name The new name of the robot part
|
|
298
|
+
* @param robotConfig The new config for the robot part
|
|
299
|
+
* @returns The updated robot part
|
|
300
|
+
*/
|
|
301
|
+
updateRobotPart(id: string, name: string, robotConfig: StructType): Promise<pb.UpdateRobotPartResponse.AsObject>;
|
|
302
|
+
/**
|
|
303
|
+
* Creates a new robot part.
|
|
304
|
+
*
|
|
305
|
+
* @param robotId The ID of the robot to create a part for
|
|
306
|
+
* @param partName The name for the new robot part
|
|
307
|
+
* @returns The ID of the newly-created robot part
|
|
308
|
+
*/
|
|
309
|
+
newRobotPart(robotId: string, partName: string): Promise<string>;
|
|
310
|
+
/**
|
|
311
|
+
* Deletes a robot part.
|
|
312
|
+
*
|
|
313
|
+
* @param partId The ID of the part to delete
|
|
314
|
+
*/
|
|
315
|
+
deleteRobotPart(partId: string): Promise<void>;
|
|
316
|
+
/**
|
|
317
|
+
* Gets a list of a robot's API keys.
|
|
318
|
+
*
|
|
319
|
+
* @param robotId The ID of the robot to get API keys for
|
|
320
|
+
* @returns A list of the robot's API keys
|
|
321
|
+
*/
|
|
322
|
+
getRobotAPIKeys(robotId: string): Promise<pb.APIKeyWithAuthorizations.AsObject[]>;
|
|
323
|
+
/**
|
|
324
|
+
* Marks a robot part as the main part.
|
|
325
|
+
*
|
|
326
|
+
* @param partId The ID of the part to mark as main
|
|
327
|
+
*/
|
|
328
|
+
markPartAsMain(partId: string): Promise<void>;
|
|
329
|
+
/**
|
|
330
|
+
* Marks a robot part for restart.
|
|
331
|
+
*
|
|
332
|
+
* @param partId The ID of the part to mark for restart
|
|
333
|
+
*/
|
|
334
|
+
markPartForRestart(partId: string): Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Creates a new secret for a robot part.
|
|
337
|
+
*
|
|
338
|
+
* @param partId The ID of the part to create a secret for
|
|
339
|
+
* @returns The robot part object
|
|
340
|
+
*/
|
|
341
|
+
createRobotPartSecret(partId: string): Promise<pb.CreateRobotPartSecretResponse.AsObject>;
|
|
342
|
+
/**
|
|
343
|
+
* Deletes a robot secret from a robot part.
|
|
344
|
+
*
|
|
345
|
+
* @param partId The ID of the part to delete a secret from
|
|
346
|
+
* @param secretId The ID of the secret to delete
|
|
347
|
+
*/
|
|
348
|
+
deleteRobotPartSecret(partId: string, secretId: string): Promise<void>;
|
|
349
|
+
/**
|
|
350
|
+
* Lists all robots in a location.
|
|
351
|
+
*
|
|
352
|
+
* @param locId The ID of the location to list robots for
|
|
353
|
+
* @returns The list of robot objects
|
|
354
|
+
*/
|
|
355
|
+
listRobots(locId: string): Promise<pb.Robot.AsObject[]>;
|
|
356
|
+
/**
|
|
357
|
+
* Creates a new robot.
|
|
358
|
+
*
|
|
359
|
+
* @param locId The ID of the location to create the robot in
|
|
360
|
+
* @param name The name of the new robot
|
|
361
|
+
* @returns The new robot's ID
|
|
362
|
+
*/
|
|
363
|
+
newRobot(locId: string, name: string): Promise<string>;
|
|
364
|
+
/**
|
|
365
|
+
* Updates an existing robot's name and/or location.
|
|
366
|
+
*
|
|
367
|
+
* @param robotId The ID of the robot to update
|
|
368
|
+
* @param locId The ID of the location to move the robot to
|
|
369
|
+
* @param name The name to update the robot to
|
|
370
|
+
* @returns The newly-modified robot object
|
|
371
|
+
*/
|
|
372
|
+
updateRobot(robotId: string, locId: string, name: string): Promise<pb.UpdateRobotResponse.AsObject>;
|
|
373
|
+
/**
|
|
374
|
+
* Deletes a robot.
|
|
375
|
+
*
|
|
376
|
+
* @param id The ID of the robot to delete
|
|
377
|
+
*/
|
|
378
|
+
deleteRobot(id: string): Promise<void>;
|
|
379
|
+
/**
|
|
380
|
+
* Lists all fragments within an organization.
|
|
381
|
+
*
|
|
382
|
+
* @param orgId The ID of the organization to list fragments for
|
|
383
|
+
* @param publicOnly Optional boolean, if true then only public fragments will
|
|
384
|
+
* be listed. Defaults to true.
|
|
385
|
+
* @returns The list of fragment objects
|
|
386
|
+
*/
|
|
387
|
+
listFragments(orgId: string, publicOnly?: boolean): Promise<pb.Fragment.AsObject[]>;
|
|
388
|
+
/**
|
|
389
|
+
* Looks up a fragment by ID.
|
|
390
|
+
*
|
|
391
|
+
* @param id The ID of the fragment to look up
|
|
392
|
+
* @returns The requested fragment
|
|
393
|
+
*/
|
|
394
|
+
getFragment(id: string): Promise<pb.GetFragmentResponse.AsObject>;
|
|
395
|
+
/**
|
|
396
|
+
* Creates a new fragment.
|
|
397
|
+
*
|
|
398
|
+
* @param orgId The ID of the organization to create the fragment under
|
|
399
|
+
* @param name The name of the new fragment
|
|
400
|
+
* @param config The new fragment's config
|
|
401
|
+
* @returns The newly created fragment
|
|
402
|
+
*/
|
|
403
|
+
createFragment(orgId: string, name: string, config: StructType): Promise<pb.CreateFragmentResponse.AsObject>;
|
|
404
|
+
/**
|
|
405
|
+
* Updates an existing fragment.
|
|
406
|
+
*
|
|
407
|
+
* @param id The ID of the fragment to update
|
|
408
|
+
* @param name The name to update the fragment to
|
|
409
|
+
* @param config The config to update the fragment to
|
|
410
|
+
* @param makePublic Optional boolean specifying whether the fragment should
|
|
411
|
+
* be public or not. If not passed the visibility will be unchanged.
|
|
412
|
+
* Fragments are private by default when created
|
|
413
|
+
* @returns The updated fragment
|
|
414
|
+
*/
|
|
415
|
+
updateFragment(id: string, name: string, config: StructType, makePublic?: boolean): Promise<pb.UpdateFragmentResponse.AsObject>;
|
|
416
|
+
/**
|
|
417
|
+
* Deletes a fragment.
|
|
418
|
+
*
|
|
419
|
+
* @param id The ID of the fragment to delete
|
|
420
|
+
*/
|
|
421
|
+
deleteFragment(id: string): Promise<void>;
|
|
422
|
+
/**
|
|
423
|
+
* Add a role under an organization.
|
|
424
|
+
*
|
|
425
|
+
* @param orgId The ID of the organization to create the role under
|
|
426
|
+
* @param entityId The ID of the entity the role belongs to (e.g., a user ID)
|
|
427
|
+
* @param role The role to add ("owner" or "operator")
|
|
428
|
+
* @param resourceType The type of resource to create the role for ("robot",
|
|
429
|
+
* "location", or "organization")
|
|
430
|
+
* @param resourceId The ID of the resource the role is being created for
|
|
431
|
+
*/
|
|
432
|
+
addRole(orgId: string, entityId: string, role: string, resourceType: string, resourceId: string): Promise<void>;
|
|
433
|
+
/**
|
|
434
|
+
* Removes a role from an organization.
|
|
435
|
+
*
|
|
436
|
+
* @param orgId The ID of the organization to remove the role from
|
|
437
|
+
* @param entityId The ID of the entity the role belongs to (e.g., a user ID)
|
|
438
|
+
* @param role The role to remove ("owner" or "operator")
|
|
439
|
+
* @param resourceType The type of resource to remove the role from ("robot",
|
|
440
|
+
* "location", or "organization")
|
|
441
|
+
* @param resourceId The ID of the resource the role is being removes from
|
|
442
|
+
*/
|
|
443
|
+
removeRole(orgId: string, entityId: string, role: string, resourceType: string, resourceId: string): Promise<void>;
|
|
444
|
+
/**
|
|
445
|
+
* Changes an existing role.
|
|
446
|
+
*
|
|
447
|
+
* @param oldAuth The existing authorization
|
|
448
|
+
* @param newAuth The new authorization
|
|
449
|
+
*/
|
|
450
|
+
changeRole(oldAuth: pb.Authorization, newAuth: pb.Authorization): Promise<void>;
|
|
451
|
+
/**
|
|
452
|
+
* List all authorizations for an organization.
|
|
453
|
+
*
|
|
454
|
+
* @param orgId The ID of the organization to list authorizations for
|
|
455
|
+
* @param resourceIds Optional list of IDs of resources to list authorizations
|
|
456
|
+
* for. If not provided, all resources will be included
|
|
457
|
+
*/
|
|
458
|
+
listAuthorizations(orgId: string, resourceIds?: string[]): Promise<pb.Authorization.AsObject[]>;
|
|
459
|
+
/**
|
|
460
|
+
* Checks whether requested permissions exist.
|
|
461
|
+
*
|
|
462
|
+
* @param permissions A list of permissions to check
|
|
463
|
+
* @returns A filtered list of the authorized permissions
|
|
464
|
+
*/
|
|
465
|
+
checkPermissions(permissions: pb.AuthorizedPermissions[]): Promise<pb.AuthorizedPermissions.AsObject[]>;
|
|
466
|
+
/**
|
|
467
|
+
* Get an item from the registry.
|
|
468
|
+
*
|
|
469
|
+
* @param itemId The ID of the item to get
|
|
470
|
+
* @returns The requested item
|
|
471
|
+
*/
|
|
472
|
+
getRegistryItem(itemId: string): Promise<pb.GetRegistryItemResponse.AsObject>;
|
|
473
|
+
/**
|
|
474
|
+
* Create a new registry item.
|
|
475
|
+
*
|
|
476
|
+
* @param orgId The ID of the organization to create the registry item under
|
|
477
|
+
* @param name The name of the registry item
|
|
478
|
+
* @param type The type of the item in the registry.
|
|
479
|
+
*/
|
|
480
|
+
createRegistryItem(orgId: string, name: string, type: keyof PackageTypeMap): Promise<void>;
|
|
481
|
+
/**
|
|
482
|
+
* Update an existing registry item.
|
|
483
|
+
*
|
|
484
|
+
* @param itemId The ID of the registry item to update
|
|
485
|
+
* @param type The PackageType to update the item to
|
|
486
|
+
* @param description A description of the item
|
|
487
|
+
* @param visibility A visibility value to update to
|
|
488
|
+
*/
|
|
489
|
+
updateRegistryItem(itemId: string, type: keyof PackageTypeMap, description: string, visibility: keyof pb.VisibilityMap): Promise<void>;
|
|
490
|
+
/**
|
|
491
|
+
* List all registry items for an organization.
|
|
492
|
+
*
|
|
493
|
+
* @param orgId The ID of the organization to query registry items for
|
|
494
|
+
* @param types A list of types to query. If empty, will not filter on type
|
|
495
|
+
* @param visibilities A list of visibilities to query for. If empty, will not
|
|
496
|
+
* filter on visibility
|
|
497
|
+
* @param platforms A list of platforms to query for. If empty, will not
|
|
498
|
+
* filter on platform
|
|
499
|
+
* @param statuses A list of statuses to query for. If empty, will not filter
|
|
500
|
+
* on status
|
|
501
|
+
* @param searchTerm Optional search term to filter on
|
|
502
|
+
* @param pageToken Optional page token for results. If not provided, will
|
|
503
|
+
* return all results
|
|
504
|
+
* @returns The list of registry items
|
|
505
|
+
*/
|
|
506
|
+
listRegistryItems(orgId: string, types: (keyof PackageTypeMap)[], visibilities: (keyof pb.VisibilityMap)[], platforms: string[], statuses: (keyof pb.RegistryItemStatusMap)[], searchTerm?: string, pageToken?: string): Promise<pb.RegistryItem.AsObject[]>;
|
|
507
|
+
/**
|
|
508
|
+
* Deletes a registry item.
|
|
509
|
+
*
|
|
510
|
+
* @param itemId The ID of the item to delete
|
|
511
|
+
*/
|
|
512
|
+
deleteRegistryItem(itemId: string): Promise<void>;
|
|
513
|
+
/**
|
|
514
|
+
* Creates a new module.
|
|
515
|
+
*
|
|
516
|
+
* @param orgId The ID of the organization to create the module under
|
|
517
|
+
* @param name The name of the module
|
|
518
|
+
* @returns The module ID and a URL to its detail page
|
|
519
|
+
*/
|
|
520
|
+
createModule(orgId: string, name: string): Promise<pb.CreateModuleResponse.AsObject>;
|
|
521
|
+
/**
|
|
522
|
+
* Updates an existing module.
|
|
523
|
+
*
|
|
524
|
+
* @param moduleId The ID of the module to update
|
|
525
|
+
* @param visibility The visibility to set for the module
|
|
526
|
+
* @param url The url to reference for documentation, code, etc.
|
|
527
|
+
* @param description A short description of the module
|
|
528
|
+
* @param models A list of models available in the module
|
|
529
|
+
* @param entrypoint The executable to run to start the module program
|
|
530
|
+
* @returns The module URL
|
|
531
|
+
*/
|
|
532
|
+
updateModule(moduleId: string, visibility: keyof pb.VisibilityMap, url: string, description: string, models: pb.Model[], entrypoint: string): Promise<string>;
|
|
533
|
+
/**
|
|
534
|
+
* Looks up a particular module.
|
|
535
|
+
*
|
|
536
|
+
* @param moduleId The ID of the module
|
|
537
|
+
* @returns The requested module
|
|
538
|
+
*/
|
|
539
|
+
getModule(moduleId: string): Promise<pb.GetModuleResponse.AsObject>;
|
|
540
|
+
/**
|
|
541
|
+
* Lists all modules for an organization.
|
|
542
|
+
*
|
|
543
|
+
* @param orgId The ID of the organization to query
|
|
544
|
+
* @returns The organization's modules
|
|
545
|
+
*/
|
|
546
|
+
listModules(orgId: string): Promise<pb.Module.AsObject[]>;
|
|
547
|
+
/**
|
|
548
|
+
* Creates a new API key.
|
|
549
|
+
*
|
|
550
|
+
* @param authorizations The list of authorizations to provide for the API key
|
|
551
|
+
* @param name An optional name for the key. If none is passed, defaults to
|
|
552
|
+
* present timestamp
|
|
553
|
+
* @returns The new key and ID
|
|
554
|
+
*/
|
|
555
|
+
createKey(authorizations: pb.Authorization[], name?: string): Promise<pb.CreateKeyResponse.AsObject>;
|
|
556
|
+
/**
|
|
557
|
+
* Deletes an existing API key.
|
|
558
|
+
*
|
|
559
|
+
* @param id The ID of the key to delete
|
|
560
|
+
*/
|
|
561
|
+
deleteKey(id: string): Promise<void>;
|
|
562
|
+
/**
|
|
563
|
+
* List all API keys for an organization.
|
|
564
|
+
*
|
|
565
|
+
* @param orgId The ID of the organization to query
|
|
566
|
+
* @returns The list of API keys
|
|
567
|
+
*/
|
|
568
|
+
listKeys(orgId: string): Promise<pb.APIKeyWithAuthorizations.AsObject[]>;
|
|
569
|
+
/**
|
|
570
|
+
* Rotates an existing API key.
|
|
571
|
+
*
|
|
572
|
+
* @param id The ID of the key to rotate
|
|
573
|
+
* @returns The updated key and ID
|
|
574
|
+
*/
|
|
575
|
+
rotateKey(id: string): Promise<pb.RotateKeyResponse.AsObject>;
|
|
576
|
+
/**
|
|
577
|
+
* Creates a new key with an existing key's authorizations
|
|
578
|
+
*
|
|
579
|
+
* @param id The ID of the key to duplicate
|
|
580
|
+
* @returns The new key and ID
|
|
581
|
+
*/
|
|
582
|
+
createKeyFromExistingKeyAuthorizations(id: string): Promise<pb.CreateKeyFromExistingKeyAuthorizationsResponse.AsObject>;
|
|
583
|
+
}
|