@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Create a comment on a task Posts a new comment on the specified task and returns the created comment. The task's owner is resolved from the task itself.

      Parameters

      • task: string

        Task ID (tsk_...).

      • input: { comment: { body: string } }

        Request body.

        • comment: { body: string }

          Parameters for the comment to create, including its body.

      Returns Promise<TaskComment>

      The newly created comment.

    • Delete a task comment Permanently removes a comment from its task. This action cannot be undone. The task's owner is resolved from the task itself. Only the comment's author, an admin of the comment's organization, or an admin of the owning team may delete a comment. Returns 403 Forbidden otherwise.

      Parameters

      • task: string

        Task ID (tsk_...).

      • comment: string

        Comment ID (tcm_...).

      Returns Promise<void>

      Empty body. The server responds with HTTP 204 No Content on success.

    • List comments on a task Returns a bounded page of comments on the specified task, ordered by creation time ascending. App-scoped developer and server-to-server callers explicitly provide the owning team, user, or agent and org.

      Parameters

      • task: string

        Task ID (tsk_...).

      • Optionalparams: {
            afterCursor?: string;
            agent?: string;
            limit?: number;
            org?: string;
            team?: string;
            user?: string;
        }

        Query parameters.

        • OptionalafterCursor?: string

          Opaque cursor returned by the previous page.

        • Optionalagent?: string

          Explicit owning agent (agi_...) for privileged calls.

        • Optionallimit?: number

          Maximum comments to return. Capped at 100.

        • Optionalorg?: string

          Explicit organization (org_...) for privileged calls; pass null when unscoped.

        • Optionalteam?: string

          Explicit owning team (tem_...) for privileged calls.

        • Optionaluser?: string

          Explicit owning user (usr_...) for privileged calls.

      Returns Promise<
          {
              after_cursor?: string;
              before_cursor?: string;
              data: {
                  author_actor?: {
                      alias?: string
                      | null;
                      id?: string | null;
                      name?: string | null;
                      profile_picture?:
                          | {
                              file?: string
                              | null;
                              height?: number | null;
                              media?: string | null;
                              mime_type?: string | null;
                              refresh_url?: string | null;
                              url?: string | null;
                              width?: number | null;
                          }
                          | null;
                  };
                  author_agent?: string;
                  author_user?: string;
                  body: string;
                  created_at?: string;
                  id: string;
                  org?: string;
                  sandbox?: string;
                  task?: string;
                  team?: string;
                  updated_at?: string;
              }[];
              has_more: boolean;
          },
      >

      Successful response

    • Update a task comment Replaces the body of an existing comment and returns the updated comment. The task's owner is resolved from the task itself. Only the comment's author, an admin of the comment's organization, or an admin of the owning team may edit a comment. Returns 403 Forbidden otherwise.

      Parameters

      • task: string

        Task ID (tsk_...).

      • comment: string

        Comment ID (tcm_...).

      • input: { body: string }

        Request body.

        • body: string

          Replacement body for the comment. Must be non-empty.

      Returns Promise<TaskComment>

      The updated comment.