-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - bridge_interactive_platform #18172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds Bridge Interactive Platform app methods and prop definitions, a “Get Listings” action, and a “New Listing Created” polling source with sample data. Implements API client with token-based requests to Bridge Data Output, enforces exclusive spatial filters, and updates package version and dependency. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Action as Get Listings Action
participant App as Bridge App Client
participant API as Bridge Data Output API
User->>Action: Trigger action with dataset + filters
Action->>Action: Validate exclusive spatial filter
Action->>App: getListings({ dataset, params })
App->>API: GET /api/v2/{dataset}/listings?access_token=...
API-->>App: 200 OK (listings bundle)
App-->>Action: Response
Action-->>User: Output + summary "Found N listings"
sequenceDiagram
autonumber
participant Timer
participant Source as New Listing Created Source
participant App as Bridge App Client
participant API as Bridge Data Output API
Note over Source: Maintains lastTs checkpoint
Timer->>Source: Run (interval)
Source->>Source: Validate exclusive spatial filter
Source->>App: getListings({ dataset, sort=OriginalEntryTimestamp, order=desc, limit })
App->>API: GET /api/v2/{dataset}/listings?access_token=...
API-->>App: 200 OK (bundle)
App-->>Source: Listings
Source->>Source: Update lastTs to newest seen
Source->>Source: Filter where OriginalEntryTimestamp > previous lastTs
loop For each new listing
Source-->>Source: Generate meta (id, summary, ts)
Source-->>Timer: Emit event
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes(no out-of-scope functional changes identified) Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (9)
components/bridge_interactive_platform/package.json (1)
15-17
: Dependency addition is appropriateAdding @pipedream/platform is required for axios/$ utilities used across the new app/action/source. Consider adding a brief changelog entry in the PR description noting this new dependency for visibility.
components/bridge_interactive_platform/sources/new-listing-created/test-event.mjs (2)
317-317
: Typo in unit string"Square Meteres" should be "Square Meters" (or "Square Metres" if using UK spelling). Since this is sample data, low priority, but fixing avoids propagating typos into user screenshots/demos.
- "BuildingAreaUnits": "Square Meteres", + "BuildingAreaUnits": "Square Meters",
855-857
: Sample URL missing protocolThe sample url lacks the https scheme. Recommend adding it to avoid confusion when users click/preview.
- "url": "api.bridgedataoutput.com/api/v2/test/listings/P_5dba1ffa4aa4055b9f2a5936" + "url": "https://api.bridgedataoutput.com/api/v2/test/listings/P_5dba1ffa4aa4055b9f2a5936"components/bridge_interactive_platform/bridge_interactive_platform.app.mjs (3)
35-39
: Minor doc nit: radius descriptionTypo and clarity: remove the trailing "s" and clarify units expectation.
- description: "Search Radius in miles, km, or degrees (no units)s", + description: "Search radius in miles, km, or degrees (specify the unit; e.g., 10mi, 5km, or degrees with no unit)",
48-57
: Naming/UX: clarify “Field” vs “Sort By”Using the same propDefinition for both the “Sort By” field and the multi-select “Fields” is clever, but can be confusing in the UI. Consider updating the base description in
propDefinitions.field
to be generic (“A response field name”), and set specific descriptions on the consuming props, which you already do. Optional.
60-62
: Optional: retries / 429 handlingBridge APIs can occasionally rate-limit. Consider adding an optional retry with backoff in
_makeRequest
using axios-retry semantics (or manualtry/catch
with exponential backoff) to improve robustness. Can be a follow-up.components/bridge_interactive_platform/actions/get-listings/get-listings.mjs (2)
93-103
: Mutually exclusive spatial filters check is goodThe guard prevents conflicting spatial filters. Consider including
radius
validation (e.g., warn ifradius
is provided withoutnear
) to help users catch misconfigurations early. Optional.- if (Object.values(coords).filter(Boolean).length > 1) { + if (Object.values(coords).filter(Boolean).length > 1) { throw new ConfigurationError("Only one of near, poly, box, or geohash can be used"); } + if (this.radius && !this.near) { + throw new ConfigurationError("`radius` can only be used with `near`."); + }
122-123
: Summary assumes Bridge response shape
response.bundle
will be defined after fixing_makeRequest
. For extra safety, you could default to 0 to avoid runtime errors if upstream changes response shape.- $.export("$summary", `Found ${response.bundle.length} listings`); + $.export("$summary", `Found ${response?.bundle?.length ?? 0} listings`);components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs (1)
115-118
: Deploy behavior: confirm initial emission vs. state-only initialization
deploy()
currently emits up to 25 events. If the product expectation is to seed state without emitting historical events, switchdeploy()
to set the initial cursor to the latest timestamp and skip emits. If emitting on deploy is desired, leave as-is.- async deploy() { - await this.processEvent(25); - }, + async deploy() { + // Initialize cursor to latest without emitting + const resp = await this.bridgeInteractivePlatform.getListings({ + dataset: this.dataset, + params: { + near: this.near, + radius: this.radius, + box: this.box, + poly: this.poly, + geohash: this.geohash, + sortBy: "OriginalEntryTimestamp", + order: "desc", + limit: 1, + }, + }); + const latest = resp?.bundle?.[0]?.OriginalEntryTimestamp; + if (latest) this._setLastTs(Date.parse(latest)); + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
components/bridge_interactive_platform/actions/get-listings/get-listings.mjs
(1 hunks)components/bridge_interactive_platform/bridge_interactive_platform.app.mjs
(1 hunks)components/bridge_interactive_platform/package.json
(2 hunks)components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs
(1 hunks)components/bridge_interactive_platform/sources/new-listing-created/test-event.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/bridge_interactive_platform/package.json
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
components/bridge_interactive_platform/bridge_interactive_platform.app.mjs
🧬 Code graph analysis (3)
components/bridge_interactive_platform/actions/get-listings/get-listings.mjs (2)
components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs (2)
coords
(67-72)response
(79-91)components/bridge_interactive_platform/bridge_interactive_platform.app.mjs (1)
response
(18-23)
components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs (2)
components/bridge_interactive_platform/actions/get-listings/get-listings.mjs (2)
coords
(94-99)response
(105-121)components/bridge_interactive_platform/bridge_interactive_platform.app.mjs (2)
response
(18-23)listing
(24-24)
components/bridge_interactive_platform/bridge_interactive_platform.app.mjs (2)
components/bridge_interactive_platform/actions/get-listings/get-listings.mjs (1)
response
(105-121)components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs (1)
response
(79-91)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
🔇 Additional comments (6)
components/bridge_interactive_platform/package.json (1)
3-3
: Version bump looks goodPackage version updated to 0.1.0. No issues from my side.
components/bridge_interactive_platform/bridge_interactive_platform.app.mjs (2)
75-82
: getListings path assembly OKPath composition and param pass-through look correct for Bridge Data Output v2.
68-71
: Could you please share the Bridge Data Output API documentation URL or a sample request/response? With that information, I can confirm whether it supports sending the access token via theAuthorization: Bearer
header instead of theaccess_token
query parameter.components/bridge_interactive_platform/actions/get-listings/get-listings.mjs (1)
105-121
: Param construction is correct; ensure data-shape after app fixOnce
_makeRequest
returnsresponse.data
, this call path will work as expected, andfields
joining is correct. No change needed here.components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs (2)
74-76
: Good exclusivity guard on spatial filtersPrevents ambiguous geographic queries. Matches the action.
106-112
: Meta payload looks goodStable id and timestamp extraction from OriginalEntryTimestamp is appropriate.
Resolves #18063
Summary by CodeRabbit
New Features
Chores