Skip to content

feat: add contact properties#705

Merged
Cisneiros merged 2 commits intocanaryfrom
feat/contact-properties
Oct 22, 2025
Merged

feat: add contact properties#705
Cisneiros merged 2 commits intocanaryfrom
feat/contact-properties

Conversation

@Cisneiros
Copy link
Member

@Cisneiros Cisneiros commented Oct 21, 2025

Summary by cubic

Adds SDK support for managing contact properties with create, list, get, update, and delete methods. Normalizes API snake_case to SDK camelCase and provides type-safe request/response interfaces.

  • New Features
    • ContactProperties class: create, list (with pagination), get, update, delete.
    • API↔SDK parsing utils (fallback_value ↔ fallbackValue); list/get return SDK types.
    • Type definitions for ContactProperty and request/response payloads.
    • Update validation: returns an error when id is missing.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 21, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/resend-node/resend@705

commit: 805fb4a

@Cisneiros Cisneiros force-pushed the feat/contact-properties branch from 9ebfd47 to 0102507 Compare October 21, 2025 23:15
@Cisneiros Cisneiros force-pushed the feat/contact-properties branch from 0102507 to e97187d Compare October 21, 2025 23:20
@Cisneiros Cisneiros marked this pull request as ready for review October 21, 2025 23:55
@Cisneiros Cisneiros requested a review from a team as a code owner October 21, 2025 23:55
@Cisneiros Cisneiros requested a review from vcapretz October 21, 2025 23:55
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 10 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="src/contact-properties/interfaces/create-contact-property-options.interface.ts">

<violation number="1" location="src/contact-properties/interfaces/create-contact-property-options.interface.ts:20">
CreateContactPropertyApiOptions should preserve the correlation between type and fallback_value; the current union allows number properties to carry string fallbacks (and vice versa), leading to invalid API payloads.</violation>
</file>

<file name="src/common/utils/parse-contact-properties-to-api-options.ts">

<violation number="1" location="src/common/utils/parse-contact-properties-to-api-options.ts:21">
parseContactPropertyToApi coerces an object missing id/object/created_at into ApiContactProperty, so any caller receives an incomplete API payload. Please include the required fields when converting.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@Cisneiros Cisneiros force-pushed the feat/contact-properties branch from 8d1b54c to 805fb4a Compare October 22, 2025 00:21
@Cisneiros Cisneiros merged commit 71c14ad into canary Oct 22, 2025
11 checks passed
@Cisneiros Cisneiros deleted the feat/contact-properties branch October 22, 2025 15:43
lucasfcosta pushed a commit that referenced this pull request Oct 27, 2025
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.

3 participants