# IInteractionService

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `interface`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

A service to interact with the current development environment.

## Definition

```typescript
interface IInteractionService {
  createBooleanInput(
      name: string,
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  createChoiceInput(
      name: string,
      choices?: InteractionChoiceOption[],
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  createFileInput(
      name: string,
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  createNumberInput(
      name: string,
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  createSecretInput(
      name: string,
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  createTextInput(
      name: string,
      options?: CreateInteractionInputOptions): InteractionInputBuilder;
  isAvailable(): boolean;
  promptConfirmation(
      title: string,
      message: string,
      options?: InteractionMessageBoxOptions,
      cancellationToken?: cancellationToken): BoolInteractionResult;
  promptInput(
      title: string,
      message: string,
      input: InteractionInputBuilder,
      options?: InteractionInputsDialogOptions,
      cancellationToken?: cancellationToken): InputInteractionResult;
  promptInputs(
      title: string,
      message: string,
      inputs: InteractionInputBuilder[],
      options?: InteractionInputsDialogOptions,
      cancellationToken?: cancellationToken): InputsInteractionResult;
  promptMessageBox(
      title: string,
      message: string,
      options?: InteractionMessageBoxOptions,
      cancellationToken?: cancellationToken): BoolInteractionResult;
  promptNotification(
      title: string,
      message: string,
      options?: InteractionNotificationOptions,
      cancellationToken?: cancellationToken): BoolInteractionResult;
  promptProgress(
      message: string,
      options?: InteractionProgressOptions,
      cancellationToken?: cancellationToken): BoolInteractionResult;
}
```

## Methods

- [createBooleanInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createbooleaninput.md) -- `method` -- Creates a boolean (checkbox) input.
    ```typescript
  createBooleanInput(name: string, options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [createChoiceInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createchoiceinput.md) -- `method` -- Creates a choice input that selects from a list of options.
    ```typescript
  createChoiceInput(name: string, choices?: InteractionChoiceOption[], options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [createFileInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createfileinput.md) -- `method` -- Creates a file input.
    ```typescript
  createFileInput(name: string, options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [createNumberInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createnumberinput.md) -- `method` -- Creates a numeric input.
    ```typescript
  createNumberInput(name: string, options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [createSecretInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createsecretinput.md) -- `method` -- Creates a secret (masked) text input.
    ```typescript
  createSecretInput(name: string, options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [createTextInput](/reference/api/typescript/aspire.hosting/iinteractionservice/createtextinput.md) -- `method` -- Creates a single-line text input.
    ```typescript
  createTextInput(name: string, options?: CreateInteractionInputOptions): InteractionInputBuilder
  ```
- [isAvailable](/reference/api/typescript/aspire.hosting/iinteractionservice/isavailable.md) -- `method` -- Gets a value indicating whether the interaction service is available to prompt the user.
    ```typescript
  isAvailable(): boolean
  ```
- [promptConfirmation](/reference/api/typescript/aspire.hosting/iinteractionservice/promptconfirmation.md) -- `method` -- Prompts the user for confirmation with an OK/Cancel dialog.
    ```typescript
  promptConfirmation(title: string, message: string, options?: InteractionMessageBoxOptions, cancellationToken?: cancellationToken): BoolInteractionResult
  ```
- [promptInput](/reference/api/typescript/aspire.hosting/iinteractionservice/promptinput.md) -- `method` -- Prompts the user for a single input.
    ```typescript
  promptInput(title: string, message: string, input: InteractionInputBuilder, options?: InteractionInputsDialogOptions, cancellationToken?: cancellationToken): InputInteractionResult
  ```
- [promptInputs](/reference/api/typescript/aspire.hosting/iinteractionservice/promptinputs.md) -- `method` -- Prompts the user for multiple inputs.
    ```typescript
  promptInputs(title: string, message: string, inputs: InteractionInputBuilder[], options?: InteractionInputsDialogOptions, cancellationToken?: cancellationToken): InputsInteractionResult
  ```
- [promptMessageBox](/reference/api/typescript/aspire.hosting/iinteractionservice/promptmessagebox.md) -- `method` -- Prompts the user with a message box dialog.
    ```typescript
  promptMessageBox(title: string, message: string, options?: InteractionMessageBoxOptions, cancellationToken?: cancellationToken): BoolInteractionResult
  ```
- [promptNotification](/reference/api/typescript/aspire.hosting/iinteractionservice/promptnotification.md) -- `method` -- Prompts the user with a notification.
    ```typescript
  promptNotification(title: string, message: string, options?: InteractionNotificationOptions, cancellationToken?: cancellationToken): BoolInteractionResult
  ```
- [promptProgress](/reference/api/typescript/aspire.hosting/iinteractionservice/promptprogress.md) -- `method` -- Displays a progress dialog with an indeterminate progress indicator.
    ```typescript
  promptProgress(message: string, options?: InteractionProgressOptions, cancellationToken?: cancellationToken): BoolInteractionResult
  ```
