← Back to scenarios
ScenarioCatalog DB

Third-party task API integration

Normalize a third-party task payload into the application’s internal task model.

Problem

The application must use task data from an external API whose payload shape differs from the internal task model.

Related patterns

Implementations

Adapter

TypeScriptApplication

Adapter in TypeScript

A TypeScript implementation of the Adapter pattern.

TypeScript
export interface TaskProvider {
  getTask(id: string): Promise<Task>;
}

Associated technologies

Apollo ClientTypeORMPostgreSQLApache KafkaClickHouseGrafana