Skip to main content
The IntegrationSpecificClient provides a type-safe API client for integration operations. It’s automatically typed based on your integration definition and available in all handlers.

Overview

The client is passed to all integration handlers with full TypeScript support for:
  • Creating and managing conversations
  • Sending messages to bots
  • Managing users
  • Getting and setting state
  • Creating events
  • File operations
All operations are typed based on your integration’s channel, event, state, and entity definitions.

Usage

Conversation Methods

createConversation

Create a conversation with type-safe channel and tags.
Example:

getOrCreateConversation

Get existing conversation or create new one.

updateConversation

Update conversation tags.

Message Methods

createMessage

Create a message and trigger bot processing. Type and payload are based on channel message definitions.
Example:

getOrCreateMessage

Get or create a message using tags for deduplication.

initializeIncomingMessage

Create user, conversation, and message in one operation.

User Methods

createUser

Create a user with integration-specific tags.
Example:

getOrCreateUser

Get or create a user.

updateUser

Update user tags.

State Methods

State operations are fully typed based on your state definitions.

getState

setState

patchState

Event Methods

createEvent

Create a typed event that bots can listen to.
Example:

Configuration Methods

configureIntegration

Update integration configuration.

File Methods

uploadFile

getFile

listFiles

deleteFile

Analytics

trackAnalytics

See Also