CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-slack--types

Comprehensive TypeScript type definitions for building Slack applications and integrations with the Node Slack SDK

94

1.11x
Overview
Eval results
Files

task.mdevals/scenario-5/

Slack App Event Logger

A utility that processes and logs Slack application lifecycle events, providing structured logging for app installations, uninstallations, and home tab openings.

Capabilities

Process app installation events

  • When given an app installation event with app_id "A123", app_name "TestApp", app_owner_id "U456", user_id "U789", and team_id "T001", returns a log message: "App installed: TestApp (A123) by user U789 in team T001" @test
  • When given an app installation event with app_id "A999", app_name "MyBot", app_owner_id "U111", user_id "U222", and team_id "T333", returns a log message: "App installed: MyBot (A999) by user U222 in team T333" @test

Process app uninstallation events

  • When given an app uninstallation event (no additional properties), returns the log message: "App uninstalled from workspace" @test

Process home tab opened events

  • When given a home opened event with user "U123", channel "D456", and tab "home", returns a log message: "User U123 opened home tab in channel D456" @test
  • When given a home opened event with user "U789", channel "D999", and tab "messages", returns a log message: "User U789 opened messages tab in channel D999" @test

Handle unknown event types

  • When given an event with an unrecognized type, returns the log message: "Unknown event type: <type>" @test

Implementation

@generates

API

/**
 * Processes a Slack app event and returns a formatted log message.
 *
 * @param event - A Slack app-related event object
 * @returns A formatted log message string
 */
export function logAppEvent(event: AppInstalledEvent | AppUninstalledEvent | AppHomeOpenedEvent | { type: string }): string;

Dependencies { .dependencies }

@slack/types { .dependency }

Provides TypeScript type definitions for Slack Events API, specifically the AppInstalledEvent, AppUninstalledEvent, and AppHomeOpenedEvent types.

Install with Tessl CLI

npx tessl i tessl/npm-slack--types

tile.json