Skip to content

feat: initiative work items, nullable work item updates, rich text values, and property enums - #58

Merged
Prashant-Surya merged 2 commits into
mainfrom
feat-initiative-work-items
Sep 22, 2026
Merged

Prashant-Surya merged 2 commits into
mainfrom
feat-initiative-work-items

Conversation

@akhil-vamshi-konam

@akhil-vamshi-konam akhil-vamshi-konam commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Description

1. Initiative work items

New client.initiatives.workItems (list, add, remove) against /work-items/. It accepts any work item type.

  • list pages by cursor (per_page, cursor)
  • client.initiatives.epics marked @deprecated; it still works

2. Clearing fields on update

UpdateWorkItem typed dates as string, so null didn't compile. undefined is dropped from the request, so there was no way to clear a field.

  • start_date, target_date, parent, estimate_point are now string | null
  • null clears the field; a field left out is untouched

3. Rich text property values

Plane requires rich text as an object. A bare string returns 400 "Rich text value must be an object".

  • RichTextValue { description_html } — request
  • WorkItemPropertyValueDetail / RichTextValueDetail — response; the HTML is in value_detail
  • values.retrieve / create / update now return WorkItemPropertyValueDetail | WorkItemPropertyValueDetail[]. The previous type was the list endpoint's shape, which these endpoints never return.

4. Property enums

Type Change
PropertyType + URL, EMAIL, FILE, FORMULA, CASCADING
PropertyRelationType + RELEASE, RICH_TEXT
CustomerPropertyType new: 9 values, no FORMULA / CASCADING
CustomerRelationType new: ISSUE, USER

Customer models use the customer types, so values Plane rejects on a customer austomerPropertyTypeis exported from the root asV2CustomerPropertyType` toavoid a name clash; the types-bundle snapshot is updated.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)

The values.* return type in (3) is a compile-time change only. Runtime behavior is unchanged.

Test Scenarios

Offline (no Plane instance needed)

  • update-payload.test.tsnull is sent; fields left out or undefined areeps the other
  • initiative-work-items.test.ts — URLs, request bodies and paging params; `/e
  • rich-text-values.test.ts — rich text is sent as an object; other value typem value_detail
  • property-types.test.ts — compile-time checks for the customer vs. work item enums

Live

  • Initiative work items: add, list, page size, remove
  • Work items: a date set to null clears, and the other date is kept

Summary by CodeRabbit

  • New Features

    • Added initiative work item APIs to list, add, and remove work items, including pagination support.
    • Added rich text property value support with HTML and plain-text details.
    • Expanded supported property and relation types, including URL, email, file, release, and rich text values.
    • Added support for clearing work item parent, estimate, start date, and target date fields with null.
  • Deprecations

    • Initiative epics APIs are deprecated in favor of initiative work item APIs.
  • Chores

    • Updated the SDK version to 0.3.1.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: fa70c681-c059-4a55-9989-935d0b1192e2

📥 Commits

Reviewing files that changed from the base of the PR and between 537b1b0 and 95229e3.

📒 Files selected for processing (18)
  • package.json
  • scripts/__fixtures__/types-bundle-exports.snapshot.txt
  • src/api/Initiatives/Epics.ts
  • src/api/Initiatives/WorkItems.ts
  • src/api/Initiatives/index.ts
  • src/api/WorkItemProperties/Values.ts
  • src/index.ts
  • src/models/Customer.ts
  • src/models/Initiative.ts
  • src/models/WorkItem.ts
  • src/models/WorkItemProperty.ts
  • src/models/common.ts
  • tests/unit/initiative-work-items.test.ts
  • tests/unit/initiative.test.ts
  • tests/unit/property-types.test.ts
  • tests/unit/work-item-types/rich-text-values.test.ts
  • tests/unit/work-items/update-payload.test.ts
  • tests/unit/work-items/work-items.test.ts
 ___________________________________________________________________________
< Two hard things: cache invalidation, naming things, and off-by-one jokes. >
 ---------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Comment @coderabbitai help to get the list of available commands.

Records the new v1 exports (initiative work items, rich text value types,
CustomerRelationType), the reshaped property/customer/update types, and
v2's CustomerPropertyType moving to the V2CustomerPropertyType alias.

Co-Authored-By: WOZCODE <contact@withwoz.com>
@Prashant-Surya
Prashant-Surya merged commit 571a0ec into main Sep 22, 2026
3 of 4 checks passed
@Prashant-Surya
Prashant-Surya deleted the feat-initiative-work-items branch September 22, 2026 11:33
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.

2 participants