class AdapterBase {
  constructor(name) {
    this.name = name;
  }

  /**
   * Poll for new data since the given timestamp.
   * @param {string|null} since - ISO 8601 timestamp, null for first run
   * @returns {Promise<Array<{
   *   source: string,
   *   source_id: string,
   *   source_channel?: string,
   *   memory_type: string,
   *   direction: string,
   *   participants?: string,
   *   subject?: string,
   *   content: string,
   *   content_raw?: string,
   *   metadata?: string,
   *   timestamp: string
   * }>>}
   */
  async poll(since) {
    throw new Error(`${this.name}.poll() not implemented`);
  }

  /**
   * Normalize source-specific raw data into a memory object.
   * @param {object} rawData
   * @returns {object} Normalized memory fields
   */
  normalize(rawData) {
    throw new Error(`${this.name}.normalize() not implemented`);
  }
}

module.exports = AdapterBase;
