Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/services/schema-detection/plugin

lib/services/schema-detection/plugin

Schema Detection Payload Plugin.

A Payload CMS plugin that provides language-aware schema detection for import workflows. Follows the Payload plugin pattern: (options) => (config) => modifiedConfig

Functions

schemaDetectionPlugin()

schemaDetectionPlugin(options?): (incomingConfig) => Config

Schema Detection Plugin for Payload CMS.

Adds schema detection capabilities to your Payload application:

  • A schema-detectors collection for database-driven configuration
  • A detector selection field on the Datasets collection
  • A SchemaDetectionService accessible via config.custom.schemaDetection

Parameters

options?

SchemaDetectionPluginOptions = {}

Returns

(incomingConfig) => Config

Example

import { schemaDetectionPlugin } from '@/lib/services/schema-detection'; export default buildConfig({ plugins: [ schemaDetectionPlugin({ extendDatasets: true, }), ], }); // Later, access the service: const service = payload.config.custom.schemaDetection.service; const result = await service.detect('my-detector', context);
Last updated on