feat: add leads and lead_labels streams#2
Merged
nickchang91 merged 1 commit intomasterfrom Apr 6, 2026
Merged
Conversation
- Add LeadsStream using GET /v1/leads with offset-based pagination, extending DynamicSchemaStream to inherit deal custom field definitions via dealFields (leads share the same custom field structure as deals) - Add LeadLabelsStream for GET /v1/leadLabels (FULL_TABLE, no pagination) - Add JSON schemas for leads and lead_labels - Register both streams in __init__.py and tap.py - Fix timestamp parsing in update_state() to handle variable microseconds (was hardcoded to .000000Z, fails on any non-zero microseconds value)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two new streams to tap-pipedrive: leads and lead_labels.
Changes
GET /v1/leadswith offset-based pagination. ExtendsDynamicSchemaStreamso leads inherit deal custom field definitions viadealFields(Pipedrive API design: leads share the same custom field structure as deals). Flattens the nestedvalueobject intolead_value_amountandlead_value_currency.GET /v1/leadLabels(FULL_TABLE). Syncs label definitions (for ex: Hot, Warm, Cold, Facebook Lead, Nurture) solabel_idson leads can be decoded.update_state()— The basePipedriveStream.update_state()hardcoded.000000Zmicroseconds when parsing bookmarks, causing aValueErroron any record with non-zero microseconds (for ex:.629000Z). Fixed to handle variable microseconds by trying%Y-%m-%dT%H:%M:%S.%fZfirst, then falling back to%Y-%m-%dT%H:%M:%SZ.Files Changed
tap_pipedrive/streams/leads.py(new)tap_pipedrive/streams/lead_labels.py(new)tap_pipedrive/schemas/leads.json(new)tap_pipedrive/schemas/lead_labels.json(new)tap_pipedrive/streams/__init__.py(register new streams)tap_pipedrive/tap.py(register new streams)tap_pipedrive/stream.py(fix timestamp parsing in update_state)