@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Add a member to a team Adds a user or agent as a member of the specified team and returns the new membership with HTTP 201. Provide exactly one of user or agent — supplying both or neither returns a 400 error. The caller must have permission to manage the team. When an app is provided, the request is scoped to that app and the caller must hold a valid app-scoped token. The default role is "member" when role is omitted.

      Parameters

      • team: string

        Team ID (team_...). The team to remove the member from.

      • input: { agent?: string; role?: string; user?: string }

        Request body.

        • Optionalagent?: string

          Agent ID (agt_...) to add as a member. Provide exactly one of user or agent.

        • Optionalrole?: string

          Role to assign. One of "owner", "admin", or "member". Defaults to "member" when omitted.

        • Optionaluser?: string

          User ID (usr_...) to add as a member. Provide exactly one of user or agent.

      Returns Promise<TeamMembership>

      The newly created team membership.

    • List members of a team Returns all members of the specified team, including both users and agents. Members are returned in a single non-paginated array ordered by join time. Bearer-authenticated users must be a member of the team to retrieve its member list. Developer and server-to-server callers can retrieve members for any team visible to their app scope. When app is provided, the request is scoped to that app and requires a valid app-scoped token.

      Parameters

      • team: string

        Team ID (team_...). The team to remove the member from.

      Returns Promise<
          {
              data: {
                  agent?: {
                      acl?: {
                          add?: { actions: ...; principal?: ...; principal_type: ... }[];
                          grants?: { actions: ...; principal?: ...; principal_type: ... }[];
                          remove?: { principal?: ...; principal_type: ... }[];
                      };
                      app?: string;
                      created_at?: string;
                      default_model?: string;
                      email?: string;
                      id: string;
                      identity?: string;
                      last_applied_template_config?: string;
                      lookup_key?: string;
                      metadata?: Record<string, unknown>;
                      name?: string;
                      org?: string;
                      org_name?: string;
                      originator?: string;
                      phone_number?: string;
                      sandbox?: string;
                      source_solution?: {
                          solution: {
                              category_keys?: (...)[];
                              created_at?: string;
                              description?: string;
                              id: string;
                              kind: string;
                              latest_solution?: string;
                              latest_version?: string;
                              lookup_key?: string;
                              metadata?: Record<(...), (...)>;
                              name?: string;
                              org?: string;
                              org_logo?: {
                                  file?: ...;
                                  height?: ...;
                                  media?: ...;
                                  mime_type?: ...;
                                  refresh_url?: ...;
                                  url?: ...;
                                  width?: ...;
                              };
                              org_name?: string;
                              org_slug?: string;
                              owners: string[];
                              readme_url?: string;
                              solution_id?: string;
                              solution_version?: string;
                              tag_keys?: (...)[];
                              template_kind?: string;
                              templates: {
                                  description?: ...;
                                  display_name?: ...;
                                  id?: ...;
                                  kind: ...;
                                  lookup_key?: ...;
                                  name?: ...;
                                  readme_url?: ...;
                                  virtual_path?: ...;
                              }[];
                              updated_at?: string;
                              upgrade_available: boolean;
                              virtual_path?: string;
                          };
                          template: {
                              created_at?: string;
                              description?: string;
                              display_name?: string;
                              id: string;
                              kind: string;
                              lookup_key?: string;
                              name?: string;
                              updated_at?: string;
                              virtual_path?: string;
                          };
                      };
                      team?: string;
                      template_upgrade_available?: boolean;
                      updated_at?: string;
                      user?: string;
                  };
                  created_at?: string;
                  id: string;
                  joined_at?: string;
                  metadata?: Record<string, unknown>;
                  name?: string;
                  profile_picture?: {
                      file?: string;
                      height?: number;
                      media?: string;
                      mime_type?: string;
                      refresh_url?: string;
                      url?: string;
                      width?: number;
                  };
                  role?: string;
                  team?: Record<string, unknown>;
                  type?: string;
                  updated_at?: string;
                  user?: {
                      alias?: string;
                      app?: string;
                      app_name?: string;
                      email?: string;
                      id: string;
                      is_system_user?: boolean;
                      metadata?: Record<string, unknown>;
                      name?: string;
                      org?: string;
                      org_name?: string;
                      org_role?: string;
                      sandbox?: string;
                      sandbox_name?: string;
                  };
              }[];
          },
      >

      Successful response

    • Remove a member or org from a team Removes a user, agent, or all members of an organization from the specified team. Provide exactly one of user, agent, or org — supplying more than one or none returns a 400 error. On success, returns 204 No Content. When org is provided, every user and agent membership belonging to that org is removed in a single call. The caller must be a member of the team's owning org to perform an org-scoped removal. You cannot target the team's owning org itself with this parameter. The caller must have permission to manage the team. When app is present, the request is scoped to that app and requires a valid app-scoped token.

      Parameters

      • team: string

        Team ID (team_...). The team to remove the member from.

      Returns Promise<void>

      Empty response. Returns 204 No Content on success.

    • Update a team member's role Changes the role of an existing user member on the specified team. Returns the updated membership on success. Only user memberships are supported by this endpoint. Attempting to update an agent membership returns 404. To change an agent's role, remove the existing membership and re-add the agent with the desired role. The caller must have permission to modify the team. You cannot change a member's role across organization boundaries. Demoting the last owner of a team returns 409. An invalid role value returns 422. When app is provided, the request is scoped to that app and requires a valid app-scoped token.

      Parameters

      • team: string

        Team ID (team_...). The team to remove the member from.

      • user: string

        User ID (usr_...) of the existing member whose role should be changed.

      • input: { role: string }

        Request body.

        • role: string

          New role to assign. One of "owner", "admin", or "member".

      Returns Promise<TeamMembership>

      The updated team membership reflecting the new role.