jseeqret - v1.0.4
    Preparing search index...
    Index

    Constructors

    Properties

    token: string
    web: WebClient

    Methods

    • auth.test -> { ok, team_id, team, user_id, user, url }

      Returns Promise<
          {
              ok: boolean;
              team_id: string
              | undefined;
              team_name: string | undefined;
              user_id: string | undefined;
              user_name: string | undefined;
              url: string | undefined;
          },
      >

    • List private channels the authenticated user is a member of.

      Returns Promise<{ id: string; name: string }[]>

    • Look up a Slack user by email, falling back to a full users.list scan if the email route is unavailable.

      Parameters

      • email: any

      Returns Promise<{ id: string; name: string; real_name: string } | null>

    • Upload a binary blob as a file-share message to a channel.

      Parameters

      • opts: { channel_id: string; filename: string; content_bytes: Buffer }
        • channel_id: string
        • filename: string

          opaque, e.g. jsenc-.bin

        • content_bytes: Buffer

          already padded ciphertext

      Returns Promise<{ file_id: string; channel_id: string; ts: string }>

    post_thread_reply

    • post_thread_reply(
          __namedParameters: { channel_id: any; thread_ts: any; text: any },
      ): Promise<{ ts: string }>

      Post a thread reply on a message.

      Parameters

      • __namedParameters: { channel_id: any; thread_ts: any; text: any }

      Returns Promise<{ ts: string }>

    • Walk conversations.history forward from oldest_ts. Returns messages in chronological order (oldest first).

      Parameters

      • opts: { channel_id: string; oldest_ts?: string; limit?: number }

      Returns Promise<object[]>

    • Fetch a file's metadata (including the authenticated download URL).

      Parameters

      • file_id: any

      Returns Promise<{ id: string; url_private: string; size: number }>

    • Download a file's bytes via an authenticated fetch against url_private. @slack/web-api does not expose a helper for this, so we use the global fetch with an Authorization: Bearer <token> header -- the same auth Slack expects for private file downloads.

      Parameters

      • url_private: any

      Returns Promise<Buffer>

    • Delete a file (fails closed on error — caller handles).

      Parameters

      • file_id: any

      Returns Promise<void>

    • Delete a message from a channel.

      Parameters

      • __namedParameters: { channel_id: any; ts: any }

      Returns Promise<void>

    • Enumerate workspace connected apps. Used by slack doctor to baseline the connected-app set (concern #7). The tokens:list API is admin-only, so we fall back to apps.list with user scope. Returns whatever Slack gives us; the caller hashes it.

      Returns Promise<{ id: string; name: string; scopes?: string[] }[]>