Class AppClient

Constructors

  • Parameters

    • transport: Transport

    Returns AppClient

Methods

  • Add a role under an organization.

    Parameters

    • organizationId: string

      The ID of the organization to create the role under

    • entityId: string

      The ID of the entity the role belongs to (for example a user ID)

    • role: string

      The role to add ("owner" or "operator")

    • resourceType: string

      The type of resource to create the role for ("robot", "location", or "organization")

    • resourceId: string

      The ID of the resource the role is being created for

    Returns Promise<void>

    await appClient.addRole(
    '<YOUR-ORGANIZATION-ID>',
    '<YOUR-USER-ID>',
    'owner',
    'robot',
    '<YOUR-ROBOT-ID>'
    );
  • Changes an existing role.

    Parameters

    Returns Promise<void>

    const oldAuth = new VIAM.appApi.Authorization({
    authorizationType: 'role',
    authorizationId: 'organization_owner',
    organizationId: '<YOUR-ORGANIZATION-ID>',
    resourceId: '<YOUR-RESOURCE-ID>', // The resource to grant access to
    resourceType: 'organization', // The type of resource to grant access to
    identityId: '<USER-ID>', // The user id of the user to grant access to (optional)
    roleId: 'owner', // The role to grant access to
    identityType: 'user',
    });
    const newAuth = new VIAM.appApi.Authorization({
    authorizationType: 'role',
    authorizationId: 'organization_operator',
    organizationId: '<YOUR-ORGANIZATION-ID>',
    resourceId: '<YOUR-RESOURCE-ID>', // The resource to grant access to
    resourceType: 'organization', // The type of resource to grant access To
    identityId: '<USER-ID>', // The user id of the user to grant access to (optional)
    roleId: 'operator', // The role to grant access to
    identityType: 'user',
    });
    await appClient.changeRole(oldAuth, newAuth);
  • Creates a new fragment.

    Parameters

    • organizationId: string

      The ID of the organization to create the fragment under

    • name: string

      The name of the new fragment

    • config: Struct

      The new fragment's config

    Returns Promise<undefined | Fragment>

    The newly created fragment

    const fragment = await appClient.createFragment(
    '<YOUR-ORGANIZATION-ID>',
    'newFragment'
    );
  • Creates a new API key.

    Parameters

    • authorizations: Authorization[]

      The list of authorizations to provide for the API key

    • Optionalname: string

      An optional name for the key. If none is passed, defaults to present timestamp

    Returns Promise<CreateKeyResponse>

    The new key and ID

  • Creates a new location.

    Parameters

    • organizationId: string

      The ID of the organization to create the location under

    • name: string

      The name of the location to create

    • OptionalparentLocationId: string

      Optional name of a parent location to create the new location under

    Returns Promise<undefined | Location>

    The location object

    const location = await appClient.createLocation(
    '<YOUR-ORGANIZATION-ID>',
    'name'
    );
  • Create a location secret (LocationAuth).

    Parameters

    • locId: string

      The ID of the location to create a LocationAuth for

    Returns Promise<undefined | LocationAuth>

    The newly created LocationAuth

    const locationAuth = await appClient.createLocationSecret(
    '<YOUR-LOCATION-ID>'
    );
  • Creates a new module.

    Parameters

    • organizationId: string

      The ID of the organization to create the module under

    • name: string

      The name of the module

    Returns Promise<CreateModuleResponse>

    The module ID and a URL to its detail page

    const module = await appClient.createModule(
    '<YOUR-ORGANIZATION-ID>',
    'newModule'
    );
  • Create a new organization.

    Parameters

    • name: string

      The name of the new organization

    Returns Promise<undefined | Organization>

    The new organization

  • Creates a new invitation to join an organization.

    Parameters

    • organizationId: string

      The id of the organization to create the invite for

    • email: string

      The email address of the user to generate an invite for

    • authorizations: Authorization[]

      The authorizations to associate with the new invite

    • sendEmailInvite: boolean = true

      Bool of whether to send an email invite (true) or automatically add a user. Defaults to true

    Returns Promise<undefined | OrganizationInvite>

    The organization invite

    const auth = new VIAM.appApi.Authorization({
    authorizationType: 'role',
    authorizationId: 'organization_operator',
    organizationId: '<YOUR-ORGANIZATION-ID>',
    resourceId: '<YOUR-RESOURCE-ID>', // The resource to grant access to
    resourceType: 'organization', // The type of resource to grant access to
    identityId: '<YOUR-USER-ID>', // The user id of the user to grant access to (optional)
    roleId: 'owner', // The role to grant access to
    identityType: 'user',
    });

    const invite = await appClient.createOrganizationInvite(
    '<YOUR-ORGANIZATION-ID>',
    'youremail@email.com',
    [auth]
    );
  • Create a new registry item.

    Parameters

    • organizationId: string

      The ID of the organization to create the registry item under

    • name: string

      The name of the registry item

    • type: PackageType

      The type of the item in the registry.

    Returns Promise<void>

    await appClient.createRegistryItem(
    '<YOUR-ORGANIZATION-ID>',
    'newRegistryItemName',
    5
    );
  • Creates a new secret for a robot part.

    Parameters

    • partId: string

      The ID of the part to create a secret for

    Returns Promise<undefined | RobotPart>

    The robot part object

    const robotPart = await appClient.createRobotPartSecret(
    '<YOUR-ROBOT-PART-ID>'
    );
  • Deletes a fragment.

    Parameters

    • id: string

      The ID of the fragment to delete

    Returns Promise<void>

    await appClient.deleteFragment('12a12ab1-1234-5678-abcd-abcd01234567');
    
  • Deletes an existing API key.

    Parameters

    • id: string

      The ID of the key to delete

    Returns Promise<DeleteKeyResponse>

    await appClient.deleteKey('<YOUR-KEY-ID>');
    
  • Deletes a location

    Parameters

    • locId: string

      The ID of the location to delete

    Returns Promise<void>

    await appClient.deleteLocation('<YOUR-LOCATION-ID>');
    
  • Deletes a location secret (LocationAuth).

    Parameters

    • locId: string

      The ID of the location to delete the LocationAuth from

    • secretId: string

      The ID of the location secret to delete

    Returns Promise<void>

    await appClient.deleteLocationSecret(
    '<YOUR-LOCATION-ID>',
    '<YOUR-SECRET-ID>'
    );
  • Deletes an organization.

    Parameters

    • organizationId: string

      The id of the organization to delete

    Returns Promise<void>

    await appClient.deleteOrganization('<YOUR-ORGANIZATION-ID>');
    
  • Deletes a pending organization invite.

    Parameters

    • organizationId: string

      The ID of the organization

    • email: string

      The email associated with the invite to delete

    Returns Promise<void>

    await appClient.deleteOrganizationInvite(
    '<YOUR-ORGANIZATION-ID>',
    'youremail@email.com'
    );
  • Removes a member from an organization.

    Parameters

    • organizationId: string

      The ID of the organization

    • userId: string

      The ID of the user

    Returns Promise<void>

    await appClient.deleteOrganizationMember(
    '<YOUR-ORGANIZATION-ID>',
    '<YOUR-USER-ID>'
    );
  • Deletes a registry item.

    Parameters

    • itemId: string

      The ID of the item to delete

    Returns Promise<void>

    await appClient.deleteRegistryItem('<YOUR-REGISTRY-ITEM-ID>');
    
  • Deletes a robot.

    Parameters

    • id: string

      The ID of the robot to delete

    Returns Promise<void>

    await appClient.deleteRobot('<YOUR-ROBOT-ID>');
    
  • Deletes a robot part.

    Parameters

    • partId: string

      The ID of the part to delete

    Returns Promise<void>

    await appClient.deleteRobotPart('<YOUR-ROBOT-PART-ID>');
    
  • Deletes a robot secret from a robot part.

    Parameters

    • partId: string

      The ID of the part to delete a secret from

    • secretId: string

      The ID of the secret to delete

    Returns Promise<void>

    await appClient.deleteRobotPartSecret(
    '<YOUR-ROBOT-PART-ID>',
    '<YOUR-SECRET-ID>'
    );
  • Retrieves the app content for an organization.

    Parameters

    • publicNamespace: string

      The public namespace of the organization

    • name: string

      The name of the app

    Returns Promise<GetAppContentResponse>

    The blob path and entrypoint of the app content

    const appContent = await appClient.getAppContent(
    '<YOUR-PUBLIC-NAMESPACE>',
    '<YOUR-APP-NAME>'
    );
  • Looks up a fragment by ID.

    Parameters

    • id: string

      The ID of the fragment to look up

    Returns Promise<undefined | Fragment>

    The requested fragment

    const fragment = await appClient.getFragment(
    '12a12ab1-1234-5678-abcd-abcd01234567'
    );
  • Looks up a location.

    Parameters

    • locId: string

      The ID of the location to query.

    Returns Promise<undefined | Location>

    The location object

    const location = await appClient.getLocation('<YOUR-LOCATION-ID>');
    
  • Retrieves user-defined metadata for a location.

    Parameters

    • id: string

      The ID of the location

    Returns Promise<Record<string, JsonValue>>

    The metadata associated with the location

    const metadata = await appClient.getLocationMetadata(
    '<YOUR-LOCATION-ID>'
    );
  • Looks up a particular module.

    Parameters

    • moduleId: string

      The ID of the module

    Returns Promise<undefined | Module>

    The requested module

    const module = await appClient.getModule('<YOUR-MODULE-ID>');
    
  • Get details about an organization.

    Parameters

    • organizationId: string

      The ID of the organization

    Returns Promise<undefined | Organization>

    Details about the organization, if it exists

    const organization = await appClient.getOrganization(
    '<YOUR-ORGANIZATION-ID>'
    );
  • Retrieves user-defined metadata for an organization.

    Parameters

    • id: string

      The ID of the organization

    Returns Promise<Record<string, JsonValue>>

    The metadata associated with the organization

    const metadata = await appClient.getOrganizationMetadata(
    '<YOUR-ORGANIZATION-ID>'
    );
  • Find out if an organization namespace is available.

    Parameters

    • namespace: string

      The namespace to query for availability

    Returns Promise<boolean>

    A boolean indicating whether or not the namespace is available

    const isAvailable =
    await appClient.getOrganizationNamespaceAvailability('name');
  • List all organizations with access to a particular location.

    Parameters

    • locationId: string

      The ID of the location to query

    Returns Promise<OrganizationIdentity[]>

    The list of locations with access to the requested location

    const organizations =
    await appClient.getOrganizationsWithAccessToLocation(
    '<YOUR-LOCATION-ID>'
    );
  • Get an item from the registry.

    Parameters

    • itemId: string

      The ID of the item to get

    Returns Promise<undefined | RegistryItem>

    The requested item

    const registryItem = await appClient.getRegistryItem(
    '<YOUR-REGISTRY-ITEM-ID>'
    );
  • Queries a robot by its ID.

    Parameters

    • id: string

      The ID of the robot

    Returns Promise<undefined | appApi.Robot>

    The Robot object

    const robot = await appClient.getRobot('<YOUR-ROBOT-ID>');
    
  • Gets a list of a robot's API keys.

    Parameters

    • robotId: string

      The ID of the robot to get API keys for

    Returns Promise<APIKeyWithAuthorizations[]>

    A list of the robot's API keys

    const robotAPIKeys =
    await appClient.getRobotAPIKeys('<YOUR-ROBOT-ID>');
  • Retrieves user-defined metadata for a robot.

    Parameters

    • id: string

      The ID of the robot

    Returns Promise<Record<string, JsonValue>>

    The metadata associated with the robot

    const metadata = await appClient.getRobotMetadata('<YOUR-ROBOT-ID>');
    
  • Queries a specific robot part by ID.

    Parameters

    • id: string

      The ID of the requested robot part

    Returns Promise<GetRobotPartResponse>

    The robot part and a its json config

    const robotPart = await appClient.getRobotPart('<YOUR-ROBOT-PART-ID>');
    
  • Get a list containing the history of a robot part.

    Parameters

    • id: string

      The ID of the requested robot part

    Returns Promise<RobotPartHistoryEntry[]>

    The list of the robot part's history

    const robotPartHistory = await appClient.getRobotPartHistory(
    '<YOUR-ROBOT-PART-ID>'
    );
  • Get a page of log entries for a specific robot part. Logs are sorted by descending time (newest first).

    Parameters

    • id: string

      The ID of the requested robot part

    • Optionalfilter: string

      Optional string to filter logs on

    • Optionallevels: string[]

      Optional array of log levels to return. Defaults to returning all log levels

    • pageToken: string = ''

      Optional string indicating which page of logs to query. Defaults to the most recent

    Returns Promise<GetRobotPartLogsResponse>

    The robot requested logs and the page token for the next page of logs

    const robotPartLogs = await appClient.getRobotPartLogs(
    '<YOUR-ROBOT-PART-ID>'
    );
  • Retrieves user-defined metadata for a robot part.

    Parameters

    • id: string

      The ID of the robot part

    Returns Promise<Record<string, JsonValue>>

    The metadata associated with the robot part

    const metadata = await appClient.getRobotPartMetadata(
    '<YOUR-ROBOT-PART-ID>'
    );
  • Returns a list of parts for a given robot

    Parameters

    • robotId: string

      The ID of the robot to query

    Returns Promise<RobotPart[]>

    The list of RobotPart objects associated with the robot

    const robotParts = await appClient.getRobotParts('<YOUR-ROBOT-ID>');
    
  • Returns a list of rover rental robots for an organization.

    Parameters

    • orgId: string

      The ID of the organization to query

    Returns Promise<RoverRentalRobot[]>

    The list of RoverRentalRobot objects

    const roverRentalRobots = await appClient.getRoverRentalRobots(
    '<YOUR-ORGANIZATION-ID>'
    );
  • Obtain a user's ID from their email address. Internal use only.

    Parameters

    • email: string

      The email address of the user

    Returns Promise<string>

    The user's ID

    // This method is used internally only. To obtain a user's ID, use the listOrganizationsByUser method.
    const members = await appClient.listOrganizationMembers(
    '<YOUR-ORGANIZATION-ID>'
    );
  • List all authorizations for an organization.

    Parameters

    • organizationId: string

      The ID of the organization to list authorizations for

    • OptionalresourceIds: string[]

      Optional list of IDs of resources to list authorizations for. If not provided, all resources will be included

    Returns Promise<Authorization[]>

    The list of authorizations

  • Lists all fragments within an organization.

    Parameters

    • organizationId: string

      The ID of the organization to list fragments for

    • publicOnly: boolean = true

      Optional, deprecated boolean. Use fragmentVisibilities instead. If true then only public fragments will be listed. Defaults to true

    • fragmentVisibility: FragmentVisibility[] = []

    Returns Promise<Fragment[]>

    The list of fragment objects

    const fragments = await appClient.listFragments(
    '<YOUR-ORGANIZATION-ID>'
    );
  • List all API keys for an organization.

    Parameters

    • orgId: string

      The ID of the organization to query

    Returns Promise<APIKeyWithAuthorizations[]>

    The list of API keys

    const keys = await appClient.listKeys('<YOUR-ORGANIZATION-ID>');
    
  • Lists all locations under an organization.

    Parameters

    • organizationId: string

      The ID of the organization to query

    Returns Promise<Location[]>

    A list of locations under the organization

    const locations = await appClient.listLocations(
    '<YOUR-ORGANIZATION-ID>'
    );
  • Parameters

    • machineId: string

      The machine ID used to filter fragments defined in a machine's parts. Also returns any fragments nested within the fragments defined in parts.

    • OptionaladditionalFragmentIds: string[]

      Additional fragment IDs to append to the response. Useful when needing to view fragments that will be provisionally added to the machine alongside existing fragments.

    Returns Promise<Fragment[]>

    The list of top level and nested fragments for a machine, as well as additionally specified fragment IDs.

    const fragments = await appClient.listMachineFragments(
    '<YOUR-MACHINE-ID>'
    );
  • Lists all modules for an organization.

    Parameters

    • organizationId: string

      The ID of the organization to query

    Returns Promise<Module[]>

    The organization's modules

    const modules = await appClient.listModules('<YOUR-ORGANIZATION-ID>');
    
  • Lists organization memebers and outstanding invites.

    Parameters

    • organizationId: string

      The id of the organization to query

    Returns Promise<ListOrganizationMembersResponse>

    An object containing organization members, pending invites, and org ID

    const members = await appClient.listOrganizationMembers(
    '<YOUR-ORGANIZATION-ID>'
    );
  • List all organizations.

    Returns Promise<Organization[]>

    The organization list

    const organizations = await appClient.listOrganizations();
    
  • List all organizations associated with a user. Internal use only.

    Parameters

    • userId: string

      The ID of the user to query

    Returns Promise<OrgDetails[]>

    The list of locations the requested user has access to

  • List all registry items for an organization.

    Parameters

    • organizationId: string

      The ID of the organization to query registry items for

    • types: PackageType[]

      A list of types to query. If empty, will not filter on type

    • visibilities: Visibility[]

      A list of visibilities to query for. If empty, will not filter on visibility

    • platforms: string[]

      A list of platforms to query for. If empty, will not filter on platform

    • statuses: RegistryItemStatus[]

      A list of statuses to query for. If empty, will not filter on status

    • OptionalsearchTerm: string

      Optional search term to filter on

    • OptionalpageToken: string

      Optional page token for results. If not provided, will return all results

    Returns Promise<RegistryItem[]>

    The list of registry items

    const registryItems = await appClient.listRegistryItems(
    '<YOUR-ORGANIZATION-ID>',
    [], // All package types
    [1], // Private packages
    [],
    [1] // Active packages
    );
  • Lists all robots in a location.

    Parameters

    • locId: string

      The ID of the location to list robots for

    Returns Promise<appApi.Robot[]>

    The list of robot objects

    const robots = await appClient.listRobots('<YOUR-LOCATION-ID>');
    
  • Get a location's LocationAuth (location secret(s)).

    Parameters

    • locId: string

      The ID of the location to retrieve LocationAuth from.

    Returns Promise<undefined | LocationAuth>

    The LocationAuth for the requested location.

    const locationAuth = await appClient.locationAuth(
    '<YOUR-LOCATION-ID>'
    );
  • Marks a robot part as the main part.

    Parameters

    • partId: string

      The ID of the part to mark as main

    Returns Promise<void>

    await appClient.markPartAsMain('<YOUR-ROBOT-PART-ID>');
    
  • Marks a robot part for restart.

    Parameters

    • partId: string

      The ID of the part to mark for restart

    Returns Promise<void>

    await appClient.markPartForRestart('<YOUR-ROBOT-PART-ID>');
    
  • Creates a new robot.

    Parameters

    • locId: string

      The ID of the location to create the robot in

    • name: string

      The name of the new robot

    Returns Promise<string>

    The new robot's ID

    const robotId = await appClient.newRobot(
    '<YOUR-LOCATION-ID>',
    'newRobot'
    );
  • Creates a new robot part.

    Parameters

    • robotId: string

      The ID of the robot to create a part for

    • partName: string

      The name for the new robot part

    Returns Promise<string>

    The ID of the newly-created robot part

    const robotPartId = await appClient.newRobotPart(
    '<YOUR-ROBOT-ID>',
    'newPart'
    );
  • Removes a role from an organization.

    Parameters

    • organizationId: string

      The ID of the organization to remove the role from

    • entityId: string

      The ID of the entity the role belongs to (for example a user ID)

    • role: string

      The role to remove ("owner" or "operator")

    • resourceType: string

      The type of resource to remove the role from ("robot", "location", or "organization")

    • resourceId: string

      The ID of the resource the role is being removes from

    Returns Promise<void>

    await appClient.removeRole(
    '<YOUR-ORGANIZATION-ID>',
    '<YOUR-USER-ID>',
    'owner',
    'robot',
    '<YOUR-ROBOT-ID>'
    );
  • Resends a pending organization invite.

    Parameters

    • organizationId: string

      The ID of the organization

    • email: string

      The email associated with the invite to resend

    Returns Promise<undefined | OrganizationInvite>

    The invite

    const invite = await appClient.resendOrganizationInvite(
    '<YOUR-ORGANIZATION-ID>',
    'youremail@email.com'
    );
  • Rotates an existing API key.

    Parameters

    • id: string

      The ID of the key to rotate

    Returns Promise<RotateKeyResponse>

    The updated key and ID

    const key = await appClient.rotateKey('<YOUR-KEY-ID>');
    
  • Shares a location with another organization

    Parameters

    • organizationId: string

      The ID of the organization to share with

    • locId: string

      The ID of the location to share

    Returns Promise<void>

    await appClient.shareLocation(
    '<OTHER-ORGANIZATION-ID>',
    '<YOUR-LOCATION-ID>'
    );
  • Get a stream of log entries for a specific robot part. Logs are sorted by descending time (newest first).

    Parameters

    • id: string

      The ID of the requested robot part

    • queue: LogEntry[]

      A queue to put the log entries into

    • Optionalfilter: string

      Optional string to filter logs on

    • errorsOnly: boolean = true

      Optional bool to indicate whether or not only error-level logs should be returned. Defaults to true

    Returns Promise<void>

    const robotPartLogs = await appClient.tailRobotPartLogs(
    '<YOUR-ROBOT-PART-ID>'
    );
  • Unshares a location with an organization

    Parameters

    • organizationId: string

      The ID of the organization to unshare with

    • locId: string

      The ID of the location to unshare

    Returns Promise<void>

    await appClient.unshareLocation(
    '<OTHER-ORGANIZATION-ID>',
    '<YOUR-LOCATION-ID>'
    );
  • Updates an existing fragment.

    Parameters

    • id: string

      The ID of the fragment to update

    • name: string

      The name to update the fragment to

    • config: Struct

      The config to update the fragment to

    • OptionalmakePublic: boolean

      Optional, deprecated boolean specifying whether the fragment should be public or not. If not passed, the visibility will be unchanged. Fragments are private by default when created

    • Optionalvisibility: FragmentVisibility

      Optional FragmentVisibility specifying the updated fragment visibility. If not passed, the visibility will be unchanged. If visibility is not set and makePublic is set, makePublic takes effect. If makePublic and visibility are set, they must not be conflicting. If neither is set, the fragment visibility will remain unchanged.

    Returns Promise<undefined | Fragment>

    The updated fragment

    const fragment = await appClient.updateFragment(
    '12a12ab1-1234-5678-abcd-abcd01234567',
    'better_name'
    );
  • Updates location details.

    Parameters

    • locId: string

      The ID of the location to update

    • Optionalname: string

      Optional string to update the location's name to

    • OptionalparentLocId: string

      Optional string to update the location's parent location to

    • Optionalregion: string

      Optional string to update the location's region to

    Returns Promise<undefined | Location>

    The location object

    const location = await appClient.updateLocation(
    '<YOUR-LOCATION-ID>',
    'newName'
    );
  • Updates user-defined metadata for a location.

    Parameters

    • id: string

      The ID of the location

    • data: Record<string, JsonValue>

      The metadata to update

    Returns Promise<void>

    await appClient.updateLocationMetadata('<YOUR-LOCATION-ID>', {
    key: 'value',
    });
  • Updates an existing module.

    Parameters

    • moduleId: string

      The ID of the module to update

    • visibility: Visibility

      The visibility to set for the module

    • url: string

      The url to reference for documentation, code, etc.

    • description: string

      A short description of the module

    • models: Model[]

      A list of models available in the module

    • entrypoint: string

      The executable to run to start the module program

    Returns Promise<string>

    The module URL

    const module = await appClient.updateModule(
    '<YOUR-MODULE-ID>',
    1,
    'https://example.com',
    'new description',
    [{ model: 'namespace:group:model1', api: 'rdk:component:generic' }],
    'entrypoint'
    );
  • Updates organization details.

    Parameters

    • organizationId: string

      The id of the organization to update

    • Optionalname: string

      Optional name to update the organization with

    • OptionalpublicNamespace: string

      Optional namespace to update the organization with

    • Optionalregion: string

      Optional region to update the organization with

    • Optionalcid: string

      Optional CRM ID to update the organization with

    Returns Promise<undefined | Organization>

    The updated organization details

    const organization = await appClient.updateOrganization(
    '<YOUR-ORGANIZATION-ID>',
    'newName'
    );
  • Updates authorizations for an existing org invite.

    Parameters

    • organizationId: string

      The id of the organization

    • email: string

      The email address associated with the invite

    • addAuthsList: Authorization[]

      List of authorizations to add to the invite

    • removeAuthsList: Authorization[]

      List of authorizations to remove from the invite

    Returns Promise<undefined | OrganizationInvite>

    The organization invite

    const auth = new VIAM.appApi.Authorization({
    authorizationType: 'role',
    authorizationId: 'organization_operator',
    organizationId: '<YOUR-ORGANIZATION-ID>',
    resourceId: '<YOUR-RESOURCE-ID>', // The resource to grant access to
    resourceType: 'organization', // The type of resource to grant access to
    identityId: '<YOUR-USER-ID>', // The user id of the user to grant access to (optional)
    roleId: 'owner', // The role to grant access to
    identityType: 'user',
    });
    const invite = await appClient.updateOrganizationInviteAuthorizations(
    '<YOUR-ORGANIZATION-ID>',
    'youremail@email.com',
    [auth],
    []
    );
  • Updates user-defined metadata for an organization.

    Parameters

    • id: string

      The ID of the organization

    • data: Record<string, JsonValue>

      The metadata to update

    Returns Promise<void>

    await appClient.updateOrganizationMetadata('<YOUR-ORGANIZATION-ID>', {
    key: 'value',
    });
  • Update an existing registry item.

    Parameters

    • itemId: string

      The ID of the registry item to update

    • type: PackageType

      The PackageType to update the item to

    • description: string

      A description of the item

    • visibility: Visibility

      A visibility value to update to

    Returns Promise<void>

    await appClient.updateRegistryItem(
    '<YOUR-REGISTRY-ITEM-ID>',
    5, // Package: ML Model
    'new description',
    1 // Private
    );
  • Change the name of an existing machine. You can only change the name of the machine, not the location.

    Parameters

    • robotId: string

      The ID of the robot to update

    • locId: string

      The ID of the location where the robot is

    • name: string

      The name to update the robot to

    Returns Promise<undefined | appApi.Robot>

    The newly-modified robot object

    const robot = await appClient.updateRobot(
    '<YOUR-ROBOT-ID>',
    '<YOUR-LOCATION-ID>',
    'newName'
    );
  • Updates user-defined metadata for a robot.

    Parameters

    • id: string

      The ID of the robot

    • data: Record<string, JsonValue>

      The metadata to update

    Returns Promise<void>

    await appClient.updateRobotMetadata('<YOUR-ROBOT-ID>', {
    key: 'value',
    });
  • Updates a robot part based on its ID.

    Parameters

    • id: string

      The ID of the requested robot part

    • name: string

      The new name of the robot part

    • robotConfig: Struct

      The new config for the robot part

    Returns Promise<undefined | RobotPart>

    The updated robot part

    const robotPart = await appClient.updateRobotPart(
    '<YOUR-ROBOT-PART-ID>',
    'newName'
    );
  • Updates user-defined metadata for a robot part.

    Parameters

    • id: string

      The ID of the robot part

    • data: Record<string, JsonValue>

      The metadata to update

    Returns Promise<void>

    await appClient.updateRobotPartMetadata('<YOUR-ROBOT-PART-ID>', {
    key: 'value',
    });
MMNEPVFCICPMFPCPTTAAATR