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-3/

Project Settings Modal Builder

Build a TypeScript utility that constructs interactive modal views for a Slack application's project settings interface. The utility should create properly typed modal structures that collect various project configuration information from users.

@generates

Requirements

Your implementation should create a function that builds a modal view with the following characteristics:

Modal Structure

The modal should have:

  • A clear title indicating it's for project settings
  • A submit button labeled "Save Settings"
  • A cancel button labeled "Cancel"
  • Multiple input blocks to collect project information

Input Fields

The modal must include these input blocks:

  1. Project Name Field: A single-line text input with a label "Project Name" and placeholder text "Enter your project name"

  2. Project Description Field: A multi-line text input with a label "Project Description" and placeholder text "Describe your project"

  3. Priority Selection: A static select menu with a label "Priority Level" that offers three options:

    • "High" priority
    • "Medium" priority
    • "Low" priority
  4. Team Members Selection: A multi-select menu for choosing users with a label "Team Members"

  5. Due Date Field: A date picker with a label "Due Date"

Type Safety

All modal components must use proper type definitions. The function should return a correctly typed modal view structure that can be used with Slack's API.

Test Cases

  • Building a complete modal returns an object with type "modal" and contains all required fields @test
  • The modal structure includes exactly 5 input blocks (project name, description, priority, team members, due date) @test
  • The priority select menu contains exactly 3 options with values "high", "medium", and "low" @test

API

/**
 * Builds a modal view for project settings configuration
 * @returns A properly typed modal view object
 */
export function buildProjectSettingsModal(): any;

Dependencies { .dependencies }

@slack/types { .dependency }

Provides TypeScript type definitions for Slack modal views, blocks, and elements.

Install with Tessl CLI

npx tessl i tessl/npm-slack--types

tile.json