Skip to main content

@idpass/data-collect-core / validateExternalSyncConfig

Function: validateExternalSyncConfig()

validateExternalSyncConfig(config): ExternalSyncConfigValidation

Defined in: components/ExternalSyncManager.ts:103

Validate an ExternalSyncConfig against the target adapter's schema WITHOUT instantiating stores or opening connections — safe to call before persisting a config.

Mirrors the validation branch of ExternalSyncManager.initialize:

  • Unknown / legacy adapter types (not in the V2 registry) are treated as valid here; initialize only logs "external sync disabled" for them and does not throw.
  • V2 adapters with a configSchema are validated against the assembled adapter config (see buildAdapterConfig).

Parameters

config

ExternalSyncConfig

Returns

ExternalSyncConfigValidation

{ valid: true } or { valid: false, message } with the schema error.