T402 API Reference - v2.8.0
    Preparing search index...

    Function validateAndExtract

    • Validates and extracts discovery info in one step

      This is a convenience function that combines validation and extraction, returning both the validation result and the info if valid.

      Parameters

      Returns { valid: boolean; info?: DiscoveryInfo; errors?: string[] }

      Object containing validation result and info (if valid)

      const extension = declareDiscoveryExtension(...);
      const { valid, info, errors } = validateAndExtract(extension);

      if (valid && info) {
      // Store info in Bazaar catalog
      } else {
      console.error("Validation errors:", errors);
      }