Skip to content

Comments

Add support for Control Protocol V2#144

Draft
gasperzgonec wants to merge 2 commits intomainfrom
gasperz/ISS-260925
Draft

Add support for Control Protocol V2#144
gasperzgonec wants to merge 2 commits intomainfrom
gasperz/ISS-260925

Conversation

@gasperzgonec
Copy link
Contributor

Description

This adds support for the new Control Protocol V2, which specifies what data timeframe should be extracted.

Old Code (Deprecated)

const event = createEvent({
  eventContextOverrides: {
    reset_extract_from: true, // Forces complete re-extraction from scratch
  },
});

New Code (Recommended)

import { ExtractionTimeDirection } from '@devrev/adaas-sdk';

// For re-extracting data from a specific time range
const event = createEvent({
  eventContextOverrides: {
    extraction_time_direction: ExtractionTimeDirection.RECONCILIATION,
    extraction_range_start: '2026-01-01T00:00:00Z',
    extraction_range_end: '2026-12-31T23:59:59Z',
  },
});

Benefits of Reconciliation Mode

  1. Precise Control: Specify exact time ranges instead of all-or-nothing re-extraction
  2. Better Performance: Only re-extract the data you need
  3. Targeted Fixes: Re-extract specific periods when bugs are found or data changes
  4. Clearer Intent: The code explicitly states what's being re-extracted and when

Scenario: Re-extract last month due to connector bug

Old:

reset_extract_from: true // Re-extracts everything - overkill!

New:

extraction_time_direction: ExtractionTimeDirection.RECONCILIATION,
extraction_range_start: '2026-01-01T00:00:00Z',
extraction_range_end: '2026-01-31T23:59:59Z'

Scenario: Full historical re-import

Old:

reset_extract_from: true

New:

extraction_time_direction: ExtractionTimeDirection.RECONCILIATION,
extraction_range_start: '2000-01-01T00:00:00Z', // Very early date
extraction_range_end: '2026-02-17T23:59:59Z'    // Today/future

Connected Issues

Checklist

  • Tests added/updated and ran with npm run test OR no tests needed.
  • Ran backwards compatibility tests with npm run test:backwards-compatibility.
  • Code formatted and checked with npm run lint.
  • Tested airdrop-template linked to this PR.
  • Documentation updated and provided a link to PR / new docs OR no docs needed.

@gasperzgonec gasperzgonec requested review from a team and radovanjorgic as code owners February 18, 2026 09:47
@gasperzgonec gasperzgonec marked this pull request as draft February 18, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant