Skip to main content

@idpass/data-collect-core / ExternalSyncAdapterV2

Interface: ExternalSyncAdapterV2

Defined in: interfaces/adapter.ts:129

External sync adapter interface for third-party system integration.

Provides a standardized contract for adapters that sync DataCollect entities with external systems. Supports typed configuration validation, health checks, and structured sync results.

Methods

descriptor()

descriptor(): AdapterDescriptor

Defined in: interfaces/adapter.ts:133

Returns metadata describing this adapter's type, version, and capabilities.

Returns

AdapterDescriptor


initialize()

initialize(config): Promise<void>

Defined in: interfaces/adapter.ts:140

Initialize the adapter with validated configuration.

Parameters

config

Record<string, unknown>

Configuration object validated against the adapter's configSchema

Returns

Promise<void>

Throws

If configuration is invalid or initialization fails


healthCheck()

healthCheck(): Promise<HealthCheckResult>

Defined in: interfaces/adapter.ts:146

Check connectivity and health of the external system.

Returns

Promise<HealthCheckResult>

Health check result with status, latency, and optional message


push()

push(entities): Promise<SyncResult>

Defined in: interfaces/adapter.ts:153

Push entities to the external system.

Parameters

entities

EntityPushPayload[]

Array of entity payloads to push

Returns

Promise<SyncResult>

Sync result with counts and any errors


pull()

pull(since?): Promise<SyncResult>

Defined in: interfaces/adapter.ts:160

Pull entities from the external system.

Parameters

since?

string

Optional ISO timestamp to pull only changes since this time

Returns

Promise<SyncResult>

Sync result with counts and any errors


pushAttachments()?

optional pushAttachments(attachments): Promise<SyncResult>

Defined in: interfaces/adapter.ts:168

Push file attachments to the external system. Optional: only implemented by adapters that support attachment sync.

Parameters

attachments

object[]

Array of attachment metadata and binary data pairs

Returns

Promise<SyncResult>

Sync result with counts and any errors


disconnect()

disconnect(): Promise<void>

Defined in: interfaces/adapter.ts:173

Disconnect from the external system and release resources.

Returns

Promise<void>