Skip to content

feat(integrations): add Quartr integration with company, event, document, audio, and live event tools - #4986

Merged
waleedlatif1 merged 2 commits into
stagingfrom
worktree-quartr-integration
Jun 12, 2026
Merged

feat(integrations): add Quartr integration with company, event, document, audio, and live event tools#4986
waleedlatif1 merged 2 commits into
stagingfrom
worktree-quartr-integration

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add Quartr integration (https://quartr.com/products/quartr-api) with 17 tools covering the full public API v3: companies, events, event summaries, event/document types, documents, reports, slide decks, transcripts, archived audio, and live events
  • API key auth via x-api-key header; all params and outputs verified against Quartr's OpenAPI 3.0 spec
  • Get Report / Get Slide Deck / Get Transcript download the document file into execution files via the standard ToolFileData URL pattern (FileToolProcessor), so PDFs/transcript JSON flow into downstream blocks
  • Quartr block with operation dropdown, conditional fields, advanced-mode filters, wandConfig on date fields, and per-operation conditional outputs
  • QuartrBlockMeta with 7 templates and 5 skills; QuartrIcon (black bgColor); docs generated with a manual intro section

Type of Change

  • New feature

Testing

  • Typecheck clean (0 errors), biome clean, check:api-validation passes
  • blocks/tools consistency suites pass (196 tests)
  • Scripted audit of every tool's params against the Quartr OpenAPI spec: no missing or phantom params

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
docsReadyReadyPreview, CommentJun 12, 2026 1:26am

Request Review

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@gitguardian

gitguardianBot commented Jun 12, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@cursor

cursorBot commented Jun 12, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large additive surface (external API calls, user API keys, file downloads from Quartr URLs) but follows existing integration patterns with no core auth or execution path changes.

Overview
Adds a Quartr integration so workflows can query investor-relations data (companies, earnings events, AI summaries, filings, slide decks, transcripts, audio, and live streams) via API key auth (x-api-key).

The PR introduces 17 tools under apps/sim/tools/quartr/, shared types/utils, and registers them in the block and tool registries. Get Report, Get Slide Deck, and Get Transcript expose downloaded PDFs/JSON as execution files for downstream blocks. A workflow Quartr block maps an operation dropdown to those tools with conditional inputs/outputs, plus templates and skills in block meta.

Docs get quartr.mdx and nav/icon wiring; integrations.json lists the new integration. A NestJS validation error extractor improves user-facing messages when the Quartr API returns field-level validation errors.

Reviewed by Cursor Bugbot for commit 451e122. Configure here.

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8aaecf1. Configure here.

@greptile-apps

greptile-appsBot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a full Quartr integration with 17 tools covering the entire Quartr public API v3 — companies, events, event summaries, event/document types, documents, reports, slide decks, transcripts, archived audio, and live events. Authentication uses x-api-key with user-only visibility throughout, and document/transcript/slide-deck tools wire the downloaded files into the ToolFileData pipeline so they're immediately usable by downstream blocks.

  • 17 tools with consistent URL-building helpers (buildQuartrUrl, buildQuartrListQuery, buildQuartrDocumentListQuery), shared DTO → domain mappers, and a centralised parseQuartrResponse error handler that surfaces structured Quartr error shapes.
  • Block UI uses tightly scoped condition arrays (UPDATED_RANGE_LIST_OPERATIONS, COMPANY_SCOPED_LIST_OPERATIONS, etc.) to show only the fields that each Quartr endpoint actually accepts — including the fix from the previous review that removed updatedAfter/updatedBefore from list_event_types and list_document_types.
  • QuartrBlockMeta ships with 7 workflow templates and 5 skills covering earnings digests, transcript downloads, filing watchers, live monitoring, and slide-deck analysis.

Confidence Score: 5/5

New integration with no changes to existing tools or shared infrastructure — safe to merge.

All 17 tools follow consistent, well-tested patterns already in the codebase. The block UI conditions are correctly scoped, previously flagged issues have been resolved, API key credentials use user-only visibility, DTO mapping handles every optional field defensively, and the file-download tools use the established ToolFileData pattern. No regressions to existing functionality.

No files require special attention. The implementation is self-contained under apps/sim/tools/quartr/ and apps/sim/blocks/blocks/quartr.ts.

Important Files Changed

FilenameOverview
apps/sim/blocks/blocks/quartr.tsBlock config with 17 operations, properly scoped UI conditions (UPDATED_RANGE_LIST_OPERATIONS correctly excludes list_event_types and list_document_types per the previous fix), advanced-mode filters, and wandConfig on all date fields.
apps/sim/tools/quartr/utils.tsCore utilities: URL builder, response parser, normalizer, and DTO mappers — all handle nullability and edge cases correctly; normalizeQuartrCommaList now uses String(value) guard as fixed in previous review.
apps/sim/tools/quartr/types.tsComplete DTO/domain type definitions and shared output property constants; optional fields are correctly distinguished between the raw DTO layer (optional) and the domain layer (nullable), and all 17 response interfaces are present.
apps/sim/tools/quartr/get_report.tsFetches report metadata with event expansion, builds ToolFileData with correct PDF MIME type/extension; fileUrl is required in QuartrDocumentDto so no null risk.
apps/sim/tools/quartr/get_transcript.tsFetches transcript metadata and downloads JSON file; correctly sets application/json MIME type and .json extension; same file-download pattern as get_report and get_slide_deck.
apps/sim/tools/quartr/list_live_events.tsLive events tool with all nine states documented in the updated description; uses normalizeQuartrCommaList for states, companyIds, and eventIds consistently.
apps/sim/tools/quartr/list_companies.tsCorrectly maps internal companyIds param to the Quartr /companies API query param ids; openfigis passed separately; all company-filter, pagination, and updatedAt fields included via buildQuartrListQuery.
apps/sim/tools/quartr/list_document_types.tsCorrectly omits company-filter and updatedAt params (those are not supported on this endpoint), passing only pagination directly — consistent with UPDATED_RANGE_LIST_OPERATIONS exclusion in the block.
apps/sim/tools/quartr/get_event_summary.tsCorrectly passes length and plain query params to the Quartr summary endpoint; isQuartrToggleEnabled handles both boolean true and string true from the block switch.
apps/sim/tools/quartr/index.tsAll 17 tool exports present and correctly named; no missing or phantom exports.

Sequence Diagram

sequenceDiagram
participant UI as Block UI
participant Block as QuartrBlock
participant Tool as Quartr Tool (selected by operation)
participant API as Quartr API v3
UI->>Block: User selects operation + fills params
Block->>Tool: "Dispatches to quartr_{operation} via tools.config.tool()"
Tool->>API: "GET {endpoint}?{built params} (x-api-key header)"
API-->>Tool: "JSON envelope {data, pagination}"
Tool->>Tool: parseQuartrResponse() map DTOs
Note over Tool: File tools also return ToolFileData with url fileUrl
Tool-->>Block: "{success, output}"
Block-->>UI: Conditional outputs shown for active operation
Loading

Reviews (3): Last reviewed commit: "fix(quartr): address review findings — n..." | Re-trigger Greptile

Comment threadapps/sim/blocks/blocks/quartr.ts
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a complete Quartr integration with 17 tools covering the full public API v3: company/event lookups, AI-generated event summaries, document listing and download (reports, slide decks, transcripts), archived audio, and live event streams. The implementation is well-structured with shared utilities, consistent DTO-to-domain mapping, proper user-only API key visibility, and the established ToolFileData URL pattern for file downloads via FileToolProcessor.

  • 17 tools registered across companies, events, documents, audio, and live events; all share common query builders (buildQuartrListQuery, buildQuartrDocumentListQuery) and a single error-handling response parser.
  • Document download tools (get_report, get_slide_deck, get_transcript) fetch metadata from the Quartr API and return a ToolFileData with a url field for downstream FileToolProcessor consumption — PDFs and JSON transcripts flow into subsequent blocks.
  • Block config exposes all 17 operations via a dropdown with conditional subblocks, advanced-mode filters, and wandConfig on date fields for AI-assisted date generation.

Confidence Score: 4/5

Safe to merge — the integration is self-contained, additive, and follows established tool/block conventions throughout.

All 17 tools follow consistent, well-tested patterns; shared utilities are clean; API key visibility is correct. The two findings are both description-level inconsistencies in list_live_events.ts: the states filter omits recordingAvailable (present in the output description) and normalizeQuartrIdList is applied to state strings rather than IDs. Neither affects runtime behavior.

apps/sim/tools/quartr/list_live_events.ts — states parameter description and normalizer choice.

Important Files Changed

FilenameOverview
apps/sim/tools/quartr/utils.tsShared utilities: URL builder, response parser, and DTO mappers — all well-structured with proper null coalescing and empty-string guard in buildQuartrUrl.
apps/sim/tools/quartr/types.tsDTO, domain model, param, response, and output-property type definitions — complete and consistent across all 17 tools.
apps/sim/tools/quartr/list_live_events.tsList live events tool — correct API endpoint and response mapping; minor issues: recordingAvailable missing from states description and normalizeQuartrIdList misapplied to state strings.
apps/sim/tools/quartr/get_report.tsFetches report metadata and returns ToolFileData with URL for FileToolProcessor downstream; follows established pattern correctly.
apps/sim/tools/quartr/get_transcript.tsFetches transcript metadata and returns ToolFileData with JSON URL; correct MIME type and extension for downstream processing.
apps/sim/blocks/blocks/quartr.tsBlock config with 17 operations, conditional subblocks, advanced-mode filters, wandConfig date fields, and per-operation conditional outputs — well-structured and complete.
apps/sim/tools/quartr/list_companies.tsList companies tool with correct ids/openfigis API param naming (distinct from companyIds used by other endpoints).
apps/sim/tools/quartr/get_event_summary.tsEvent summary tool; correctly avoids sending plain=false to the API and maps all summary fields.
apps/sim/tools/registry.tsAll 17 Quartr tools registered in the tool registry.

Sequence Diagram

sequenceDiagram
participant User
participant QuartrBlock
participant ToolSelector
participant QuartrTool
participant QuartrAPI
participant FileToolProcessor
User->>QuartrBlock: Configure operation + params
QuartrBlock->>ToolSelector: "quartr_${operation}"
ToolSelector->>QuartrTool: dispatch with params
alt List operations
QuartrTool->>QuartrAPI: "GET /public/v3/{endpoint}?filters"
QuartrAPI-->>QuartrTool: PaginatedDto
QuartrTool-->>QuartrBlock: items[], nextCursor
else Get single entity
QuartrTool->>QuartrAPI: "GET /public/v3/{endpoint}/{id}"
QuartrAPI-->>QuartrTool: SingleDto
QuartrTool-->>QuartrBlock: entity
else Document file download
QuartrTool->>QuartrAPI: "GET /public/v3/documents/{type}/{id}?expand=event"
QuartrAPI-->>QuartrTool: SingleDto with fileUrl
QuartrTool-->>QuartrBlock: "document + ToolFileData{url}"
QuartrBlock->>FileToolProcessor: ToolFileData with pre-signed fileUrl
FileToolProcessor->>QuartrAPI: GET fileUrl (CDN)
FileToolProcessor-->>QuartrBlock: file stored in execution files
end
Loading

Reviews (2): Last reviewed commit: "feat(integrations): add Quartr integrati..." | Re-trigger Greptile

Comment threadapps/sim/tools/quartr/list_live_events.ts Outdated
Comment threadapps/sim/tools/quartr/list_live_events.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 451e122. Configure here.

…ng boolean toggles, accurate descriptions, NestJS validation error extractor
@waleedlatif1
waleedlatif1force-pushed the worktree-quartr-integration branch from 451e122 to d56689aCompareJune 12, 2026 01:22
@waleedlatif1
waleedlatif1 merged commit 8e96036 into stagingJun 12, 2026
8 of 9 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-quartr-integration branch June 12, 2026 01:26
Sign up for freeto 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

@waleedlatif1