@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    • Archive an artifact Soft-deletes the artifact identified by artifact. The artifact record is retained in storage but is no longer returned by the list or show endpoints. The authenticated user must have write access to the artifact's owning team or organization. Attempting to archive an artifact you do not own returns 403. Attempting to archive an artifact that does not exist or is already archived returns 404.

      Parameters

      • artifact: string

        Artifact ID (art_...) of the artifact to archive.

      Returns Promise<void>

      Returns 204 No Content on success. The artifact is soft-deleted and no longer accessible through the API.

    • Retrieve raw artifact file content Returns the raw binary content of the file stored for the specified artifact. The response Content-Type header reflects the artifact file's MIME type, so you can pipe the response body directly to disk or display it in a browser. By default the endpoint serves the artifact's current version. Pass the version parameter to retrieve a specific historical version. The authenticated user must have read access to the artifact's owning team or organization.

      Parameters

      • artifact: string

        Artifact ID (art_...) of the artifact whose content to retrieve.

      • Optionalparams: { version?: number }

        Query parameters.

        • Optionalversion?: number

          Version number to retrieve. Omit to return the artifact's current version.

      Returns Promise<{ content: ArrayBuffer; mimeType: string }>

      Raw binary content of the artifact file. The Content-Type header is set to the artifact's stored MIME type.

    • Delete an artifact Permanently deletes the artifact and all associated file versions. This operation is irreversible — deleted artifacts and their file content cannot be recovered. The authenticated user must have write access to the artifact's owning team or organization. Returns 404 if the artifact does not exist or is not accessible to the caller.

      Parameters

      • artifact: string

        Artifact ID (art_...) of the artifact to delete.

      Returns Promise<void>

      Empty body. HTTP 204 indicates the artifact and all associated file versions were permanently deleted.

    • Retrieve an artifact Returns the artifact identified by artifact. The response includes metadata such as name, description, version, and a signed file_url for downloading the current file version. Image artifacts also include an image_source object with display-ready metadata. The authenticated user must have read access to the artifact's owning team or organization. Returns 404 if the artifact does not exist or is not accessible to the caller.

      Parameters

      • artifact: string

        Artifact ID (art_...) of the artifact to retrieve.

      Returns Promise<Artifact>

      The requested artifact, including its current version's file metadata and signed download URL.

    • Update an artifact Updates the metadata and, optionally, the file content of an existing artifact. This endpoint uses optimistic concurrency control: you must supply the artifact's current version number as from_version. If another update has incremented the version since you last fetched the artifact, the request returns 409. To replace the artifact's file, include a nested file object with Base64 data, filename, and mime_type. Omitting file leaves the existing file unchanged. The authenticated user or developer must have write access to the artifact's owner.

      Parameters

      • artifact: string

        Artifact ID (art_...) of the artifact to update.

      • input: {
            description?: string;
            file?: { data: string; filename?: string; mime_type?: string };
            file_content?: string;
            file_content_type?: string;
            file_name?: string;
            from_version: number;
            name?: string;
        }

        Request body.

        • Optionaldescription?: string

          New description for the artifact. Omit to leave the existing description unchanged.

        • Optionalfile?: { data: string; filename?: string; mime_type?: string }

          Replacement file payload. Omit to leave the current file unchanged.

        • Optionalfile_content?: string

          Legacy flat Base64 file content. Prefer file.data.

        • Optionalfile_content_type?: string

          Legacy flat MIME type. Prefer file.mime_type.

        • Optionalfile_name?: string

          Legacy flat filename. Prefer file.filename.

        • from_version: number

          The artifact's current version number, used for optimistic concurrency control. Returns 409 if this value does not match the server's current version.

        • Optionalname?: string

          New display name for the artifact. Omit to leave the existing name unchanged.

      Returns Promise<Artifact>

      The artifact after applying the update, reflecting the new version number and any changed metadata or file.