Skip to content

Conversation

@jverce
Copy link
Contributor

@jverce jverce commented Jun 10, 2025

Changelog

  • Add types for the missing configurable props
  • Fix the Defaultable type to correctly handle arrays
  • Fixed the ConfigurablePropTimer type to define cron expressions and time intervals
  • Mark the auth field in the SQL prop type as optional

Summary by CodeRabbit

  • New Features
    • Enhanced configurable properties with new types for timers, apphooks, HTTP, database services, Airtable, and Discord channels.
    • Added support for labeled options in configurable properties.
    • Included app descriptions and pagination metadata in app listings.
  • Bug Fixes
    • Improved type handling for arrays and made certain fields optional for better flexibility.
  • Documentation
    • Updated changelog and version information to reflect the latest release.

* Add types for the missing configurable props
* Fix the `Defaultable` type to correctly handle arrays
* Fixed the `ConfigurablePropTimer` type to define cron expressions
  and time intervals
* Mark the `auth` field in the SQL prop type as optional
@jverce jverce self-assigned this Jun 10, 2025
@jverce jverce added bug Something isn't working enhancement New feature or request pd-api Pipedream API requests User submitted Submitted by a user javascript Pull requests that update Javascript code tracked internally Issue is also tracked in our internal issue tracker prioritized Prioritized issue user request labels Jun 10, 2025
@vercel
Copy link

vercel bot commented Jun 10, 2025

@jverce is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 10, 2025 6:55pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

"""

Walkthrough

This update introduces SDK version 1.6.9, enhancing type definitions for configurable properties. The Defaultable type now supports arrays and labeled options, and several new domain-specific configurable prop types have been added. The auth field in the SQL property type is now optional. The App type includes a new description field, and the GetAppsResponse type now supports pagination metadata. Documentation and version numbers were updated accordingly.

Changes

File(s) Change Summary
packages/sdk/CHANGELOG.md Documented SDK v1.6.9 release, detailing new types, improved type accuracy, and optionality enhancements.
packages/sdk/package.json Updated SDK version from 1.6.8 to 1.6.9.
packages/sdk/src/shared/component.ts Expanded Defaultable type, added new configurable prop types (timers, apphooks, arrays, HTTP, DB, Airtable, Discord), made SQL auth optional, and updated union types.
packages/sdk/src/shared/index.ts Extended App type with description field; updated GetAppsResponse to include pagination metadata.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SDK
  participant Component

  User->>SDK: Define configurable property (with new/updated types)
  SDK->>Component: Pass property with enhanced typing (e.g., labeled options, timer, etc.)
  Component-->>SDK: Use property with improved type safety and optional fields
  SDK-->>User: Enforce and expose accurate types in component interface
Loading

Poem

🐇✨
New types hop in, a version anew,
Arrays and labels, options to view.
Timers and hooks, Discord in tow,
SQL’s auth is now optional, you know!
With every fresh type, our SDK grows—
A garden of options, where flexibility flows.

"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/sdk/src/shared/index.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jverce jverce requested a review from Copilot June 10, 2025 18:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves type definitions for configurable props within the SDK by adding missing types and refining type behaviors.

  • Added new types for configurable props including Airtable, Discord, and Timer.
  • Fixed the Defaultable type to correctly handle arrays and updated relevant prop types.
  • Marked the auth field in the SQL prop type as optional and updated the package version and changelog.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/sdk/src/shared/component.ts Updated various configurable prop types and refined the Defaultable type
packages/sdk/package.json Bumped version from 1.6.8 to 1.6.9
packages/sdk/CHANGELOG.md Updated changelog to reflect the new version and changes

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (2)
packages/sdk/src/shared/component.ts (2)

1-1: ⚠️ Potential issue

Incorrect ESLint disable syntax

// eslint-disable @typescript-eslint/no-explicit-any does not disable the rule – ESLint expects either
/* eslint-disable @typescript-eslint/no-explicit-any */ (file-wide) or // eslint-disable-next-line … (one line).
Currently the directive is ignored, so the any usages below will still be lint-checked.

-// eslint-disable @typescript-eslint/no-explicit-any
+/* eslint-disable @typescript-eslint/no-explicit-any */

181-223: ⚠️ Potential issue

PropValue is out of sync with the new prop types

All newly-added type strings resolve to never, which breaks ConfiguredProps<T> and removes
type-safety for consumers.

Add cases for each new literal, e.g.:

   : T extends "string[]"
   ? string[]
+  : T extends "$.interface.timer"
+  ? TimerInterval | TimerCron
+  : T extends "$.interface.apphook"
+  ? unknown                     // TODO: refine
+  : T extends "$.interface.http"
+  ? unknown                     // TODO: refine
+  : T extends "$.service.db"
+  ? unknown                     // TODO: refine
+  : T extends "$.discord.channel"
+  ? string
+  : T extends "$.discord.channel[]"
+  ? string[]
+  : T extends "$.airtable.baseId"
+  ? string
+  : T extends "$.airtable.tableId"
+  ? string
+  : T extends "$.airtable.viewId"
+  ? string
+  : T extends "$.airtable.fieldId"
+  ? string
   : T extends "sql"
   ? { app: string; query: string; params: unknown[] }
   : never;

Failing to update this mapping will surface as never types or unexpected any leakage in downstream code.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0359787 and 8c40839.

📒 Files selected for processing (3)
  • packages/sdk/CHANGELOG.md (1 hunks)
  • packages/sdk/package.json (1 hunks)
  • packages/sdk/src/shared/component.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: test
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
packages/sdk/package.json (1)

4-4: Version bump acknowledged

Package version correctly updated to 1.6.9 to reflect the new typings. No issues here.

packages/sdk/CHANGELOG.md (1)

5-17: Changelog entry looks good

The 1.6.9 notes capture all noteworthy type changes and breaking-risk areas.

@jverce jverce requested a review from Copilot June 10, 2025 18:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 171cdee and e6c47a5.

📒 Files selected for processing (2)
  • packages/sdk/CHANGELOG.md (1 hunks)
  • packages/sdk/src/shared/index.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/sdk/CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Lint Code Base
  • GitHub Check: test
🔇 Additional comments (1)
packages/sdk/src/shared/index.ts (1)

517-519: Pagination intersection looks good, but double-check runtime callers

Changing GetAppsResponse to PaginationResponse & { data: App[] } is type-safe and aligns with other paginated responses in this file. 👍
Please verify all callers (client.getApps, etc.) that previously assumed only { data: App[] } now correctly handle page_info. At runtime nothing breaks, but TypeScript consumers will start seeing property-existence errors if they destructure responses carelessly.

@jverce jverce merged commit 66dd29f into PipedreamHQ:master Jun 10, 2025
11 of 12 checks passed
@jverce jverce deleted the fix/add-missing-prop-types branch June 10, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code pd-api Pipedream API requests prioritized Prioritized issue tracked internally Issue is also tracked in our internal issue tracker user request User submitted Submitted by a user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants