Skip to content

Conversation

Prashant-Surya
Copy link
Member

@Prashant-Surya Prashant-Surya commented Sep 27, 2025

Description

  • Pages API
  • Issue Relation API
  • ModuleIssue API
  • CycleIssue API

Summary by CodeRabbit

  • New Features
    • Added APIs for epics (list/retrieve), pages (create and fetch details for projects/workspaces), workspace project member management, work item relations (create/list/remove), attachment updates, and listing issue property values for a work item.
  • Behavior Changes
    • Adding work items to cycles or modules now returns arrays instead of single items.
  • Breaking Changes
    • Access enum renamed; relation type enum updated for issue properties. Update integrations accordingly.
  • Documentation
    • README updated to reflect the new version.
  • Chores
    • Package version bumped to 0.1.5.

- Pages API
- Issue Relation API
- ModuleIssue API
- CycleIssue API
Copy link

coderabbitai bot commented Sep 27, 2025

Walkthrough

Adds new APIs for epics, pages, and workspaces; introduces work item relations and attachment upload endpoints; adjusts certain endpoints to return arrays; replaces AccessEnum with AccessBd4Enum; replaces RelationTypeEnum with IssuePropertyAPIRelationTypeEnum; adds Epic and paginated models; bumps README/package versions and updates many headers to API spec 0.0.2.

Changes

Cohort / File(s) Summary
New API surfaces
src/apis/EpicsApi.ts, src/apis/PagesApi.ts, src/apis/WorkspacesApi.ts, src/apis/index.ts
Adds EpicsApi (list/retrieve), PagesApi (create/get project/workspace pages), WorkspacesApi (add project member), and re-exports in index.
Work item relations API
src/apis/WorkItemsApi.ts, src/models/IssueRelation*.ts, src/models/IssueRelationResponse.ts
Adds create/list/remove work item relations with supporting models and serializers.
Attachment upload + property values API
src/apis/WorkItemAttachmentsApi.ts, src/apis/WorkItemPropertiesApi.ts
Adds uploadWorkItemAttachment (PATCH) and listIssuePropertyValuesForAWorkitem (GET) with request interfaces and handlers.
Array return type changes
src/apis/CyclesApi.ts, src/apis/ModulesApi.ts
Changes addCycleWorkItems/addModuleWorkItems to return arrays; updates JSON mapping accordingly.
Enum swap: AccessEnum → AccessBd4Enum
src/models/AccessEnum.ts, src/models/AccessBd4Enum.ts, src/models/IssueComment*.ts, src/models/PatchedIssueCommentCreateRequest.ts
Removes AccessEnum; adds AccessBd4Enum; updates IssueComment and create/patched request models and serializers to use new enum.
Relation enum change for properties
src/models/RelationTypeEnum.ts (removed), src/models/IssuePropertyAPIRelationTypeEnum.ts, src/models/IssuePropertyAPI*.ts, src/models/PatchedIssuePropertyAPIRequest.ts
Replaces RelationTypeEnum with IssuePropertyAPIRelationTypeEnum across IssueProperty API/request models and serializers.
Epics model and pagination
src/models/Epic.ts, src/models/PaginatedEpicResponse.ts
Adds Epic model and paginated response with (de)serialization helpers.
Pages models
src/models/PageCreateAPI*.ts, src/models/PageDetailAPI.ts
Adds PageCreateAPI, PageCreateAPIAccessEnum, PageCreateAPIRequest, and PageDetailAPI models with converters.
Spec header bumps (0.0.1 → 0.0.2)
src/apis/AssetsApi.ts, .../IntakeApi.ts, .../LabelsApi.ts, .../MembersApi.ts, .../ProjectsApi.ts, .../StatesApi.ts, .../UsersApi.ts, .../WorkItemActivityApi.ts, .../WorkItemCommentsApi.ts, .../WorkItemLinksApi.ts, .../WorkItemTypesApi.ts, .../WorkItemWorklogsApi.ts
Updates header comments only; no logic changes.
Spec header bumps (models)
src/models/* excluding newly added/removed files mentioned above
Updates header comments to API spec 0.0.2; no logic changes.
Version/docs
package.json, README.md
Bumps package version to 0.1.5 and updates README references.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant EpicsApi
  participant Auth as Auth (API Key/OAuth2)
  participant Server as Plane API
  Client->>EpicsApi: listEpics(projectId, slug, cursor?, perPage?)
  EpicsApi->>Auth: Attach X-API-Key/Authorization
  EpicsApi->>Server: GET /workspaces/{slug}/projects/{project_id}/epics
  Server-->>EpicsApi: PaginatedEpicResponse (JSON)
  EpicsApi-->>Client: PaginatedEpicResponse
  Client->>EpicsApi: retrieveEpic(pk, projectId, slug, fields?)
  EpicsApi->>Server: GET /.../epics/{pk}
  Server-->>EpicsApi: Epic (JSON)
  EpicsApi-->>Client: Epic
Loading
sequenceDiagram
  autonumber
  actor Client
  participant WorkItemsApi
  participant Server as Plane API
  Note over Client,WorkItemsApi: Relations
  Client->>WorkItemsApi: createWorkItemRelation({relationType, issues}, ids)
  WorkItemsApi->>Server: POST /issues/{issue_id}/relations/
  Server-->>WorkItemsApi: IssueRelation (JSON)
  WorkItemsApi-->>Client: IssueRelation
  Client->>WorkItemsApi: listWorkItemRelations(issueId,...)
  WorkItemsApi->>Server: GET /issues/{issue_id}/relations/
  Server-->>WorkItemsApi: IssueRelationResponse
  WorkItemsApi-->>Client: IssueRelationResponse
  Client->>WorkItemsApi: removeWorkItemRelation({relatedIssue}, ids)
  WorkItemsApi->>Server: POST /issues/{issue_id}/relations/remove/
  Server-->>WorkItemsApi: 204/OK
  WorkItemsApi-->>Client: void
Loading
sequenceDiagram
  autonumber
  actor Client
  participant PagesApi
  participant Server as Plane API
  Note over Client,PagesApi: Pages (Project/Workspace)
  Client->>PagesApi: createProjectPage({name, descriptionHtml,...}, ids)
  PagesApi->>Server: POST /projects/{project_id}/pages/
  Server-->>PagesApi: PageCreateAPI
  PagesApi-->>Client: PageCreateAPI
  Client->>PagesApi: getWorkspacePageDetail(pk, slug)
  PagesApi->>Server: GET /workspaces/{slug}/pages/{pk}/
  Server-->>PagesApi: PageDetailAPI
  PagesApi-->>Client: PageDetailAPI
Loading
sequenceDiagram
  autonumber
  actor Client
  participant WorkspacesApi
  participant Server as Plane API
  Client->>WorkspacesApi: workspacesProjectsMembersCreate(projectId, slug)
  WorkspacesApi->>Server: POST /workspaces/{slug}/projects/{project_id}/members/
  Server-->>WorkspacesApi: 204/OK
  WorkspacesApi-->>Client: void
Loading
sequenceDiagram
  autonumber
  actor Client
  participant CyclesApi
  participant ModulesApi
  participant Server as Plane API
  Note over Client,Server: add*WorkItems now return arrays
  Client->>CyclesApi: addCycleWorkItems(...)
  CyclesApi->>Server: POST /cycles/.../issues/
  Server-->>CyclesApi: [CycleIssue]
  CyclesApi-->>Client: Array<CycleIssue>
  Client->>ModulesApi: addModuleWorkItems(...)
  ModulesApi->>Server: POST /modules/.../issues/
  Server-->>ModulesApi: [ModuleIssue]
  ModulesApi-->>Client: Array<ModuleIssue>
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Suggested reviewers

  • Saurabhkmr98

Poem

I thumped my paws on verdant ground,
New epics bloom, relations bound.
Pages flutter, crisp and bright—
Arrays now dance in tidy light.
A workspace welcomes one more friend—
0.1.5, we onward wend.
(_/) hop (^.^)✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.69% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title indicates a version bump to 0.1.5 but refers vaguely to “below changes” without summarizing the primary functional additions, making it too generic to quickly understand the main changes. Consider revising the title to directly summarize the key updates, for example “feat: add Epics, Pages, Workspaces APIs and bump SDK to 0.1.5” to make it more descriptive and concise.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/v0.1.5

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

Copy link

@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: 6

🧹 Nitpick comments (7)
src/apis/MembersApi.ts (2)

68-76: Duplicate Authorization header assignment.
Authorization is set twice; second block is redundant. Remove the duplicate to avoid confusion.

Apply this diff:

         if (this.configuration && this.configuration.accessToken) {
             // oauth required
             headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
         }
 
-        if (this.configuration && this.configuration.accessToken) {
-            // oauth required
-            headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
-        }
-

117-125: Duplicate Authorization header assignment.
Same redundancy in getWorkspaceMembersRaw. Remove the second block.

Apply this diff:

         if (this.configuration && this.configuration.accessToken) {
             // oauth required
             headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
         }
 
-        if (this.configuration && this.configuration.accessToken) {
-            // oauth required
-            headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
-        }
-
README.md (2)

39-39: Consider unpinning version in install command for easier updates.
Using the package without the explicit version helps consumers get patch updates by default.

Example:

  • npm install @makeplane/plane-node-sdk --save

48-95: Add a short example for newly added APIs.
A minimal snippet for Epics/Pages/Workspaces will help adopters of 0.1.5.

Example:

import { Configuration, EpicsApi, PagesApi, WorkspacesApi } from "@makeplane/plane-node-sdk";

const config = new Configuration({ apiKey: "<PLANE_API_KEY>" });
const epics = new EpicsApi(config);
const pages = new PagesApi(config);
const workspaces = new WorkspacesApi(config);

// e.g., list epics
// await epics.listEpics({ slug: "<workspace-slug>", projectId: "<project-id>" });
src/models/IssueRelationResponse.ts (1)

96-128: Default relation arrays when deserializing

Right now the deserializer forwards whatever the server returns. If an API response omits one of these relation groups or sends it as null, consumers of the SDK will see undefined/null even though the TypeScript contract promises an array. Defaulting each group to [] keeps the client-side surface predictable and avoids downstream guards. Consider applying:

-        'blocking': json['blocking'],
-        'blockedBy': json['blocked_by'],
-        'duplicate': json['duplicate'],
-        'relatesTo': json['relates_to'],
-        'startAfter': json['start_after'],
-        'startBefore': json['start_before'],
-        'finishAfter': json['finish_after'],
-        'finishBefore': json['finish_before'],
+        'blocking': json['blocking'] ?? [],
+        'blockedBy': json['blocked_by'] ?? [],
+        'duplicate': json['duplicate'] ?? [],
+        'relatesTo': json['relates_to'] ?? [],
+        'startAfter': json['start_after'] ?? [],
+        'startBefore': json['start_before'] ?? [],
+        'finishAfter': json['finish_after'] ?? [],
+        'finishBefore': json['finish_before'] ?? [],
src/apis/EpicsApi.ts (1)

81-89: Remove the duplicate OAuth header assignment

Each block checks configuration.accessToken and writes the same Authorization header twice. The second block is redundant, adds an extra awaited call, and makes it easier to introduce divergence later. Please drop the duplicate block in both places.

-        if (this.configuration && this.configuration.accessToken) {
-            // oauth required
-            headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
-        }

Also applies to: 148-156

src/apis/PagesApi.ts (1)

93-101: Deduplicate the repeated Authorization header block

The same if (this.configuration && this.configuration.accessToken) block appears twice in each method, performing identical work. Keeping only one instance in each spot eliminates unnecessary awaits and keeps the code generator-style output tidy.

-        if (this.configuration && this.configuration.accessToken) {
-            // oauth required
-            headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
-        }

Apply the change in all four affected locations (createProjectPageRaw, createWorkspacePageRaw, getProjectPageDetailRaw, and getWorkspacePageDetailRaw).

Also applies to: 152-160, 216-224, 272-280

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03cc30b and 61784cc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (107)
  • .openapi-generator/FILES (4 hunks)
  • README.md (2 hunks)
  • package.json (1 hunks)
  • src/apis/AssetsApi.ts (1 hunks)
  • src/apis/CyclesApi.ts (3 hunks)
  • src/apis/EpicsApi.ts (1 hunks)
  • src/apis/IntakeApi.ts (1 hunks)
  • src/apis/LabelsApi.ts (1 hunks)
  • src/apis/MembersApi.ts (1 hunks)
  • src/apis/ModulesApi.ts (3 hunks)
  • src/apis/PagesApi.ts (1 hunks)
  • src/apis/ProjectsApi.ts (1 hunks)
  • src/apis/StatesApi.ts (1 hunks)
  • src/apis/UsersApi.ts (1 hunks)
  • src/apis/WorkItemActivityApi.ts (1 hunks)
  • src/apis/WorkItemAttachmentsApi.ts (3 hunks)
  • src/apis/WorkItemCommentsApi.ts (1 hunks)
  • src/apis/WorkItemLinksApi.ts (1 hunks)
  • src/apis/WorkItemPropertiesApi.ts (3 hunks)
  • src/apis/WorkItemTypesApi.ts (1 hunks)
  • src/apis/WorkItemWorklogsApi.ts (1 hunks)
  • src/apis/WorkItemsApi.ts (9 hunks)
  • src/apis/WorkspacesApi.ts (1 hunks)
  • src/apis/index.ts (2 hunks)
  • src/models/AccessBd4Enum.ts (1 hunks)
  • src/models/AccessEnum.ts (0 hunks)
  • src/models/Cycle.ts (1 hunks)
  • src/models/CycleCreateRequest.ts (1 hunks)
  • src/models/CycleIssue.ts (1 hunks)
  • src/models/CycleIssueRequestRequest.ts (1 hunks)
  • src/models/CycleLite.ts (1 hunks)
  • src/models/EntityTypeEnum.ts (1 hunks)
  • src/models/Epic.ts (1 hunks)
  • src/models/GenericAssetUploadRequest.ts (1 hunks)
  • src/models/GetWorkspaceMembers200ResponseInner.ts (1 hunks)
  • src/models/GroupEnum.ts (1 hunks)
  • src/models/IntakeIssue.ts (1 hunks)
  • src/models/IntakeIssueCreateRequest.ts (1 hunks)
  • src/models/IntakeWorkItemStatusEnum.ts (1 hunks)
  • src/models/Issue.ts (1 hunks)
  • src/models/IssueActivity.ts (1 hunks)
  • src/models/IssueAttachment.ts (1 hunks)
  • src/models/IssueAttachmentUploadRequest.ts (1 hunks)
  • src/models/IssueComment.ts (4 hunks)
  • src/models/IssueCommentCreateRequest.ts (4 hunks)
  • src/models/IssueDetail.ts (1 hunks)
  • src/models/IssueExpand.ts (1 hunks)
  • src/models/IssueForIntakeRequest.ts (1 hunks)
  • src/models/IssueLink.ts (1 hunks)
  • src/models/IssueLinkCreateRequest.ts (1 hunks)
  • src/models/IssuePropertyAPI.ts (4 hunks)
  • src/models/IssuePropertyAPIRelationTypeEnum.ts (1 hunks)
  • src/models/IssuePropertyAPIRequest.ts (4 hunks)
  • src/models/IssuePropertyOptionAPI.ts (1 hunks)
  • src/models/IssuePropertyOptionAPIRequest.ts (1 hunks)
  • src/models/IssuePropertyValueAPI.ts (1 hunks)
  • src/models/IssuePropertyValueAPIDetail.ts (1 hunks)
  • src/models/IssuePropertyValueAPIRequest.ts (1 hunks)
  • src/models/IssueRelation.ts (1 hunks)
  • src/models/IssueRelationCreateRelationTypeEnum.ts (1 hunks)
  • src/models/IssueRelationCreateRequest.ts (1 hunks)
  • src/models/IssueRelationRemoveRequest.ts (1 hunks)
  • src/models/IssueRelationResponse.ts (1 hunks)
  • src/models/IssueRequest.ts (1 hunks)
  • src/models/IssueSearch.ts (1 hunks)
  • src/models/IssueSearchItem.ts (1 hunks)
  • src/models/IssueTypeAPI.ts (1 hunks)
  • src/models/IssueTypeAPIRequest.ts (1 hunks)
  • src/models/IssueWorkLogAPI.ts (1 hunks)
  • src/models/IssueWorkLogAPIRequest.ts (1 hunks)
  • src/models/Label.ts (1 hunks)
  • src/models/LabelCreateUpdateRequest.ts (1 hunks)
  • src/models/Module.ts (1 hunks)
  • src/models/ModuleCreateRequest.ts (1 hunks)
  • src/models/ModuleIssue.ts (1 hunks)
  • src/models/ModuleIssueRequestRequest.ts (1 hunks)
  • src/models/ModuleLite.ts (1 hunks)
  • src/models/ModuleStatusEnum.ts (1 hunks)
  • src/models/NetworkEnum.ts (1 hunks)
  • src/models/PageCreateAPI.ts (1 hunks)
  • src/models/PageCreateAPIAccessEnum.ts (1 hunks)
  • src/models/PageCreateAPIRequest.ts (1 hunks)
  • src/models/PageDetailAPI.ts (1 hunks)
  • src/models/PaginatedArchivedCycleResponse.ts (1 hunks)
  • src/models/PaginatedArchivedModuleResponse.ts (1 hunks)
  • src/models/PaginatedCycleIssueResponse.ts (1 hunks)
  • src/models/PaginatedCycleResponse.ts (1 hunks)
  • src/models/PaginatedEpicResponse.ts (1 hunks)
  • src/models/PaginatedIntakeIssueResponse.ts (1 hunks)
  • src/models/PaginatedIssueActivityDetailResponse.ts (1 hunks)
  • src/models/PaginatedIssueActivityResponse.ts (1 hunks)
  • src/models/PaginatedIssueCommentResponse.ts (1 hunks)
  • src/models/PaginatedIssueLinkDetailResponse.ts (1 hunks)
  • src/models/PaginatedIssueLinkResponse.ts (1 hunks)
  • src/models/PaginatedLabelResponse.ts (1 hunks)
  • src/models/PaginatedModuleIssueResponse.ts (1 hunks)
  • src/models/PaginatedModuleResponse.ts (1 hunks)
  • src/models/PaginatedProjectResponse.ts (1 hunks)
  • src/models/PaginatedStateResponse.ts (1 hunks)
  • src/models/PaginatedWorkItemResponse.ts (1 hunks)
  • src/models/PatchedAssetUpdateRequest.ts (1 hunks)
  • src/models/PatchedCycleUpdateRequest.ts (1 hunks)
  • src/models/PatchedGenericAssetUpdateRequest.ts (1 hunks)
  • src/models/PatchedIntakeIssueUpdateRequest.ts (1 hunks)
  • src/models/PatchedIssueCommentCreateRequest.ts (4 hunks)
  • src/models/PatchedIssueLinkUpdateRequest.ts (1 hunks)
  • src/models/PatchedIssuePropertyAPIRequest.ts (4 hunks)
⛔ Files not processed due to max files limit (27)
  • src/models/PatchedIssuePropertyOptionAPIRequest.ts
  • src/models/PatchedIssueRequest.ts
  • src/models/PatchedIssueTypeAPIRequest.ts
  • src/models/PatchedIssueWorkLogAPIRequest.ts
  • src/models/PatchedLabelCreateUpdateRequest.ts
  • src/models/PatchedModuleUpdateRequest.ts
  • src/models/PatchedProjectUpdateRequest.ts
  • src/models/PatchedStateRequest.ts
  • src/models/PriorityEnum.ts
  • src/models/Project.ts
  • src/models/ProjectCreateRequest.ts
  • src/models/ProjectWorklogSummary.ts
  • src/models/PropertyTypeEnum.ts
  • src/models/RelationTypeEnum.ts
  • src/models/RetrieveWorkItemAttachment400Response.ts
  • src/models/State.ts
  • src/models/StateLite.ts
  • src/models/StateRequest.ts
  • src/models/TimezoneEnum.ts
  • src/models/TransferCycleIssueRequestRequest.ts
  • src/models/TransferCycleWorkItems200Response.ts
  • src/models/TransferCycleWorkItems400Response.ts
  • src/models/TypeEnum.ts
  • src/models/UserAssetUploadRequest.ts
  • src/models/UserLite.ts
  • src/models/index.ts
  • src/runtime.ts
💤 Files with no reviewable changes (1)
  • src/models/AccessEnum.ts
🧰 Additional context used
🧬 Code graph analysis (19)
src/apis/WorkspacesApi.ts (1)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/apis/WorkItemAttachmentsApi.ts (1)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/models/PatchedIssueCommentCreateRequest.ts (1)
src/models/AccessBd4Enum.ts (2)
  • AccessBd4EnumFromJSON (38-40)
  • AccessBd4EnumToJSON (46-48)
src/apis/WorkItemPropertiesApi.ts (2)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/models/IssuePropertyValueAPI.ts (2)
  • IssuePropertyValueAPI (20-129)
  • IssuePropertyValueAPIFromJSON (140-142)
src/models/PaginatedEpicResponse.ts (1)
src/models/Epic.ts (3)
  • Epic (28-209)
  • EpicFromJSON (223-225)
  • EpicToJSON (266-268)
src/apis/EpicsApi.ts (3)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/models/PaginatedEpicResponse.ts (2)
  • PaginatedEpicResponse (28-101)
  • PaginatedEpicResponseFromJSON (122-124)
src/models/Epic.ts (2)
  • Epic (28-209)
  • EpicFromJSON (223-225)
src/apis/CyclesApi.ts (2)
src/runtime.ts (2)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
src/models/CycleIssue.ts (2)
  • CycleIssue (23-90)
  • CycleIssueFromJSON (101-103)
src/models/PageCreateAPIRequest.ts (1)
src/models/PageCreateAPIAccessEnum.ts (2)
  • PageCreateAPIAccessEnumFromJSON (38-40)
  • PageCreateAPIAccessEnumToJSON (46-48)
src/models/IssuePropertyAPIRequest.ts (1)
src/models/IssuePropertyAPIRelationTypeEnum.ts (2)
  • IssuePropertyAPIRelationTypeEnumFromJSON (38-40)
  • IssuePropertyAPIRelationTypeEnumToJSON (46-48)
src/models/Epic.ts (1)
src/models/PriorityEnum.ts (2)
  • PriorityEnumFromJSON (44-46)
  • PriorityEnumToJSON (52-54)
src/models/PageCreateAPI.ts (1)
src/models/PageCreateAPIAccessEnum.ts (2)
  • PageCreateAPIAccessEnumFromJSON (38-40)
  • PageCreateAPIAccessEnumToJSON (46-48)
src/models/IssueComment.ts (1)
src/models/AccessBd4Enum.ts (2)
  • AccessBd4EnumFromJSON (38-40)
  • AccessBd4EnumToJSON (46-48)
src/models/PatchedIssuePropertyAPIRequest.ts (1)
src/models/IssuePropertyAPIRelationTypeEnum.ts (2)
  • IssuePropertyAPIRelationTypeEnumFromJSON (38-40)
  • IssuePropertyAPIRelationTypeEnumToJSON (46-48)
src/models/IssueCommentCreateRequest.ts (1)
src/models/AccessBd4Enum.ts (2)
  • AccessBd4EnumFromJSON (38-40)
  • AccessBd4EnumToJSON (46-48)
src/apis/ModulesApi.ts (2)
src/runtime.ts (2)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
src/models/ModuleIssue.ts (2)
  • ModuleIssue (23-90)
  • ModuleIssueFromJSON (101-103)
src/models/IssuePropertyAPI.ts (1)
src/models/IssuePropertyAPIRelationTypeEnum.ts (2)
  • IssuePropertyAPIRelationTypeEnumFromJSON (38-40)
  • IssuePropertyAPIRelationTypeEnumToJSON (46-48)
src/apis/WorkItemsApi.ts (5)
src/models/IssueRelationCreateRequest.ts (2)
  • IssueRelationCreateRequest (31-53)
  • IssueRelationCreateRequestToJSON (81-83)
src/models/IssueRelationRemoveRequest.ts (2)
  • IssueRelationRemoveRequest (23-30)
  • IssueRelationRemoveRequestToJSON (54-56)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/models/IssueRelation.ts (2)
  • IssueRelation (23-102)
  • IssueRelationFromJSON (111-113)
src/models/IssueRelationResponse.ts (2)
  • IssueRelationResponse (22-71)
  • IssueRelationResponseFromJSON (88-90)
src/models/IssueRelationCreateRequest.ts (1)
src/models/IssueRelationCreateRelationTypeEnum.ts (2)
  • IssueRelationCreateRelationTypeEnumFromJSON (50-52)
  • IssueRelationCreateRelationTypeEnumToJSON (58-60)
src/apis/PagesApi.ts (4)
src/models/PageCreateAPIRequest.ts (1)
  • PageCreateAPIRequest (28-89)
src/runtime.ts (3)
  • InitOverrideFunction (297-297)
  • ApiResponse (392-395)
  • HTTPHeaders (291-291)
src/models/PageCreateAPI.ts (1)
  • PageCreateAPI (28-137)
src/models/PageDetailAPI.ts (1)
  • PageDetailAPI (20-75)
🔇 Additional comments (26)
src/models/IssueAttachmentUploadRequest.ts (1)

7-7: API spec version bump looks correct

Header now matches the 0.0.2 spec used elsewhere in the PR. No further changes needed.

src/models/IssueWorkLogAPIRequest.ts (1)

7-7: API header version bump aligns with the broader spec upgrade.

Matches the other 0.0.2 updates in this release.

src/models/GetWorkspaceMembers200ResponseInner.ts (1)

7-7: API spec version bump verified

Header reflects the new 0.0.2 spec without touching runtime behavior. 👍

src/models/IssueDetail.ts (1)

7-7: Header version bump looks good.

Thanks for syncing the generated model with API spec 0.0.2; no further changes needed here.

src/apis/StatesApi.ts (1)

7-7: Header version bump looks good.

Thanks for aligning the generated client metadata with API spec 0.0.2. All good here.

src/models/PatchedCycleUpdateRequest.ts (1)

7-7: Doc comment version bump looks good.

The spec header now matches the 0.0.2 rollout noted elsewhere in the PR. No additional changes needed.

src/models/IssuePropertyValueAPI.ts (1)

7-7: Version header bump aligns with API spec 0.0.2.

src/apis/WorkItemTypesApi.ts (1)

7-7: Spec header bump looks good.

The header now reflects the 0.0.2 spec, matching the broader SDK update.

src/apis/LabelsApi.ts (1)

7-7: Spec header update acknowledged

The version bump to 0.0.2 keeps this generated client aligned with the latest spec. No further action needed here.

src/models/IssueActivity.ts (1)

7-7: Spec header update acknowledged

Confirming the header now references API spec 0.0.2; no additional changes required.

src/models/Module.ts (1)

7-7: Spec header update acknowledged

Thanks for keeping the auto-generated header in sync with spec version 0.0.2.

src/apis/AssetsApi.ts (1)

7-7: Spec header update acknowledged

The header update to API spec 0.0.2 looks good; no behavior changes observed.

src/models/PaginatedArchivedModuleResponse.ts (1)

7-7: Spec header update acknowledged

Verified the header now targets spec 0.0.2; nothing else changed in this serializer.

src/apis/WorkItemPropertiesApi.ts (1)

103-108: Double-check the unused propertyId parameter.

This new request type enforces propertyId, but the path never serializes it. Please confirm with the 0.0.2 spec whether the parameter (and the associated replace) should be removed, or whether the path is missing a {property_id} segment. Avoid forcing consumers to supply a parameter that cannot affect the request.

src/models/Issue.ts (1)

7-7: Spec header bump consistent with updated API

API spec reference now points to 0.0.2, which matches the broader version uplift in this release.

src/models/IssuePropertyOptionAPI.ts (1)

7-7: Header version aligns with API 0.0.2

Confirmed the autogenerated spec banner reflects the new API spec version without impacting runtime behavior.

src/models/PaginatedIssueLinkResponse.ts (1)

7-7: Spec reference updated appropriately

The documentation banner now references API spec 0.0.2, keeping the model metadata in sync with the release.

src/models/IssueLinkCreateRequest.ts (1)

7-7: API spec metadata in sync

The header comment correctly reflects API spec version 0.0.2 for this autogenerated model.

src/apis/WorkItemLinksApi.ts (1)

7-7: Work item links API banner reflects spec 0.0.2

Spec metadata is updated consistently; no functional changes observed.

src/apis/MembersApi.ts (1)

7-7: Spec version bump looks good.
No functional impact; aligns with API Spec 0.0.2.

package.json (1)

3-3: Version bump acknowledged.
0.1.5 set. Ensure README and tags are aligned (they appear updated).

README.md (1)

1-1: README version updated.
Matches package.json (0.1.5).

src/apis/index.ts (3)

5-5: New API exports look good.
EpicsApi is correctly re-exported.


10-10: New API exports look good.
PagesApi is correctly re-exported.


22-22: Approve API exports All referenced files in src/apis exist and export EpicsApi, PagesApi, and WorkspacesApi classes.

src/models/Epic.ts (1)

17-21: PriorityEnum imports confirmed
Exports for PriorityEnumFromJSONTyped and PriorityEnumToJSONTyped exist in src/models/PriorityEnum.ts; imports are valid.

Comment on lines +378 to +402
const headerParameters: runtime.HTTPHeaders = {};

headerParameters['Content-Type'] = 'application/json';

if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-attachments/{pk}/`.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId']))).replace(`{${"pk"}}`, encodeURIComponent(String(requestParameters['pk']))).replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: requestParameters['body'] as any,
}, initOverrides);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Serialize the PATCH payload before sending

fetch rejects plain objects as a request body. With the current signature, callers will naturally pass an object (e.g. { uploaded: true }), which will trigger a runtime TypeError because we set the header to application/json but never stringify the payload. Please JSON-encode the body (or reuse the existing serializer) before dispatching so the endpoint works in practice.

-        const headerParameters: runtime.HTTPHeaders = {};
-
-        headerParameters['Content-Type'] = 'application/json';
+        const headerParameters: runtime.HTTPHeaders = {};
+
+        let body: any = undefined;
+        if (requestParameters['body'] !== undefined && requestParameters['body'] !== null) {
+            headerParameters['Content-Type'] = 'application/json';
+            body = JSON.stringify(requestParameters['body']);
+        }
@@
-            body: requestParameters['body'] as any,
+            body: body,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-attachments/{pk}/`.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId']))).replace(`{${"pk"}}`, encodeURIComponent(String(requestParameters['pk']))).replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: requestParameters['body'] as any,
}, initOverrides);
const headerParameters: runtime.HTTPHeaders = {};
let body: any = undefined;
if (requestParameters['body'] !== undefined && requestParameters['body'] !== null) {
headerParameters['Content-Type'] = 'application/json';
body = JSON.stringify(requestParameters['body']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-attachments/{pk}/`
.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId'])))
.replace(`{${"pk"}}`, encodeURIComponent(String(requestParameters['pk'])))
.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId'])))
.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: body,
}, initOverrides);
🤖 Prompt for AI Agents
In src/apis/WorkItemAttachmentsApi.ts around lines 378 to 402, the PATCH request
sets Content-Type: application/json but passes requestParameters['body']
directly (a plain object), which causes fetch to throw; JSON-encode the payload
before sending by replacing the raw body with
JSON.stringify(requestParameters['body']) (or run it through the module's
existing serializer if available) so the request body matches the header and is
accepted by fetch.

Comment on lines +709 to +773
async listIssuePropertyValuesForAWorkitemRaw(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssuePropertyValueAPI>> {
if (requestParameters['issueId'] == null) {
throw new runtime.RequiredError(
'issueId',
'Required parameter "issueId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}

if (requestParameters['projectId'] == null) {
throw new runtime.RequiredError(
'projectId',
'Required parameter "projectId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}

if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError(
'propertyId',
'Required parameter "propertyId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}

if (requestParameters['slug'] == null) {
throw new runtime.RequiredError(
'slug',
'Required parameter "slug" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-properties/values/`.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId']))).replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"property_id"}}`, encodeURIComponent(String(requestParameters['propertyId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => IssuePropertyValueAPIFromJSON(jsonValue));
}

/**
* List issue property values for a workitem
* List issue property values for a workitem
*/
async listIssuePropertyValuesForAWorkitem(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssuePropertyValueAPI> {
const response = await this.listIssuePropertyValuesForAWorkitemRaw(requestParameters, initOverrides);
return await response.value();
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Correct the response type to an array.

The server returns a list here, but the SDK now deserializes it as a single IssuePropertyValueAPI. IssuePropertyValueAPIFromJSON will therefore run against the entire array, yielding an object full of undefined fields. Please keep the return type as an array and map each element, consistent with the other “list” operations in this class.

-    async listIssuePropertyValuesForAWorkitemRaw(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssuePropertyValueAPI>> {
+    async listIssuePropertyValuesForAWorkitemRaw(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IssuePropertyValueAPI>>> {
@@
-        return new runtime.JSONApiResponse(response, (jsonValue) => IssuePropertyValueAPIFromJSON(jsonValue));
+        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IssuePropertyValueAPIFromJSON));
     }
@@
-    async listIssuePropertyValuesForAWorkitem(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssuePropertyValueAPI> {
+    async listIssuePropertyValuesForAWorkitem(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IssuePropertyValueAPI>> {
         const response = await this.listIssuePropertyValuesForAWorkitemRaw(requestParameters, initOverrides);
         return await response.value();
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async listIssuePropertyValuesForAWorkitemRaw(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssuePropertyValueAPI>> {
if (requestParameters['issueId'] == null) {
throw new runtime.RequiredError(
'issueId',
'Required parameter "issueId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['projectId'] == null) {
throw new runtime.RequiredError(
'projectId',
'Required parameter "projectId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError(
'propertyId',
'Required parameter "propertyId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['slug'] == null) {
throw new runtime.RequiredError(
'slug',
'Required parameter "slug" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-properties/values/`.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId']))).replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"property_id"}}`, encodeURIComponent(String(requestParameters['propertyId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => IssuePropertyValueAPIFromJSON(jsonValue));
}
/**
* List issue property values for a workitem
* List issue property values for a workitem
*/
async listIssuePropertyValuesForAWorkitem(requestParameters: ListIssuePropertyValuesForAWorkitemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssuePropertyValueAPI> {
const response = await this.listIssuePropertyValuesForAWorkitemRaw(requestParameters, initOverrides);
return await response.value();
}
async listIssuePropertyValuesForAWorkitemRaw(
requestParameters: ListIssuePropertyValuesForAWorkitemRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<runtime.ApiResponse<Array<IssuePropertyValueAPI>>> {
if (requestParameters['issueId'] == null) {
throw new runtime.RequiredError(
'issueId',
'Required parameter "issueId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['projectId'] == null) {
throw new runtime.RequiredError(
'projectId',
'Required parameter "projectId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError(
'propertyId',
'Required parameter "propertyId" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
if (requestParameters['slug'] == null) {
throw new runtime.RequiredError(
'slug',
'Required parameter "slug" was null or undefined when calling listIssuePropertyValuesForAWorkitem().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
}
if (this.configuration && this.configuration.accessToken) {
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}
const response = await this.request(
{
path: `/api/v1/workspaces/{slug}/projects/{project_id}/issues/{issue_id}/issue-properties/values/`
.replace(`{${"issue_id"}}`, encodeURIComponent(String(requestParameters['issueId'])))
.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId'])))
.replace(`{${"property_id"}}`, encodeURIComponent(String(requestParameters['propertyId'])))
.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(
response,
(jsonValue) => jsonValue.map(IssuePropertyValueAPIFromJSON)
);
}
/**
* List issue property values for a workitem
* List issue property values for a workitem
*/
async listIssuePropertyValuesForAWorkitem(
requestParameters: ListIssuePropertyValuesForAWorkitemRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<Array<IssuePropertyValueAPI>> {
const response = await this.listIssuePropertyValuesForAWorkitemRaw(requestParameters, initOverrides);
return await response.value();
}
🤖 Prompt for AI Agents
In src/apis/WorkItemPropertiesApi.ts around lines 709 to 773, the response is
currently treated as a single IssuePropertyValueAPI but the server returns a
list; update the method to return IssuePropertyValueAPI[] by changing the
JSONApiResponse generic and its converter to parse an array (map each element
through IssuePropertyValueAPIFromJSON), and change
listIssuePropertyValuesForAWorkitem’s return type to
Promise<IssuePropertyValueAPI[]> (and await response.value() as an array).
Ensure the runtime.JSONApiResponse instantiation and the value() return types
reflect IssuePropertyValueAPI[] consistently.

Comment on lines +266 to +268
export function EpicToJSON(json: any): Epic {
return EpicToJSONTyped(json, false);
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

EpicToJSON has incorrect signature and parameter name.
It should accept Epic and return JSON, not the other way around.

Apply this diff:

-export function EpicToJSON(json: any): Epic {
-    return EpicToJSONTyped(json, false);
-}
+export function EpicToJSON(value?: Epic | null): any {
+    return EpicToJSONTyped(value, false);
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function EpicToJSON(json: any): Epic {
return EpicToJSONTyped(json, false);
}
export function EpicToJSON(value?: Epic | null): any {
return EpicToJSONTyped(value, false);
}
🤖 Prompt for AI Agents
In src/models/Epic.ts around lines 266-268, the exported EpicToJSON currently
takes a JSON input and returns an Epic, but it should accept an Epic (or
null/undefined) and return a JSON representation; change the function signature
and parameter name accordingly (e.g. value?: Epic | null) and have it call
EpicToJSONTyped with that Epic value and false, returning the resulting JSON
type; update any TypeScript types/returns to reflect the correct input (Epic)
and output (any/JSON).

return EpicToJSONTyped(json, false);
}

export function EpicToJSONTyped(value?: Omit<Epic, 'id'|'deleted_at'|'created_at'|'updated_at'|'description_binary'|'assignees'|'labels'> | null, ignoreDiscriminator: boolean = false): any {
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Fix Omit keys to match Epic interface (camelCase).
Snake_case keys don’t exist on Epic and won’t be omitted.

Apply this diff:

-export function EpicToJSONTyped(value?: Omit<Epic, 'id'|'deleted_at'|'created_at'|'updated_at'|'description_binary'|'assignees'|'labels'> | null, ignoreDiscriminator: boolean = false): any {
+export function EpicToJSONTyped(value?: Omit<Epic, 'id'|'deletedAt'|'createdAt'|'updatedAt'|'descriptionBinary'|'assignees'|'labels'> | null, ignoreDiscriminator: boolean = false): any {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function EpicToJSONTyped(value?: Omit<Epic, 'id'|'deleted_at'|'created_at'|'updated_at'|'description_binary'|'assignees'|'labels'> | null, ignoreDiscriminator: boolean = false): any {
export function EpicToJSONTyped(value?: Omit<Epic, 'id'|'deletedAt'|'createdAt'|'updatedAt'|'descriptionBinary'|'assignees'|'labels'> | null, ignoreDiscriminator: boolean = false): any {
🤖 Prompt for AI Agents
In src/models/Epic.ts around line 270, the Omit type uses snake_case keys that
don't exist on the Epic interface; change the omitted property names to the
interface's camelCase names so the type correctly omits them. Replace the
current Omit<Epic,
'id'|'deleted_at'|'created_at'|'updated_at'|'description_binary'|'assignees'|'labels'>
with Omit<Epic,
'id'|'deletedAt'|'createdAt'|'updatedAt'|'descriptionBinary'|'assignees'|'labels'>
(preserve the existing value?: ... | null and ignoreDiscriminator parameter).

Comment on lines +137 to +148
export function IssueRelationToJSON(json: any): IssueRelation {
return IssueRelationToJSONTyped(json, false);
}

export function IssueRelationToJSONTyped(value?: Omit<IssueRelation, 'id'|'project_id'|'sequence_id'|'relation_type'|'name'|'type_id'|'is_epic'|'state_id'|'priority'|'created_by'|'created_at'|'updated_at'|'updated_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}

return {

};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix IssueRelation serialization

Line 141 currently returns an empty object for every IssueRelation, so any consumer calling IssueRelationToJSON silently loses all relation data. That’s a functional regression for downstream SDK users who rely on this helper to persist or forward serialized payloads. Please emit the actual fields instead of {}.

-export function IssueRelationToJSON(json: any): IssueRelation {
-    return IssueRelationToJSONTyped(json, false);
-}
-
-export function IssueRelationToJSONTyped(value?: Omit<IssueRelation, 'id'|'project_id'|'sequence_id'|'relation_type'|'name'|'type_id'|'is_epic'|'state_id'|'priority'|'created_by'|'created_at'|'updated_at'|'updated_by'> | null, ignoreDiscriminator: boolean = false): any {
-    if (value == null) {
-        return value;
-    }
-
-    return {
-        
-    };
-}
+export function IssueRelationToJSON(value?: IssueRelation | null): any {
+    if (value == null) {
+        return value;
+    }
+
+    return {
+        'id': value['id'],
+        'project_id': value['projectId'],
+        'sequence_id': value['sequenceId'],
+        'relation_type': value['relationType'],
+        'name': value['name'],
+        'type_id': value['typeId'],
+        'is_epic': value['isEpic'],
+        'state_id': value['stateId'],
+        'priority': value['priority'],
+        'created_by': value['createdBy'],
+        'created_at': value['createdAt']?.toISOString(),
+        'updated_at': value['updatedAt']?.toISOString(),
+        'updated_by': value['updatedBy'],
+    };
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function IssueRelationToJSON(json: any): IssueRelation {
return IssueRelationToJSONTyped(json, false);
}
export function IssueRelationToJSONTyped(value?: Omit<IssueRelation, 'id'|'project_id'|'sequence_id'|'relation_type'|'name'|'type_id'|'is_epic'|'state_id'|'priority'|'created_by'|'created_at'|'updated_at'|'updated_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
};
export function IssueRelationToJSON(value?: IssueRelation | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'project_id': value['projectId'],
'sequence_id': value['sequenceId'],
'relation_type': value['relationType'],
'name': value['name'],
'type_id': value['typeId'],
'is_epic': value['isEpic'],
'state_id': value['stateId'],
'priority': value['priority'],
'created_by': value['createdBy'],
'created_at': value['createdAt']?.toISOString(),
'updated_at': value['updatedAt']?.toISOString(),
'updated_by': value['updatedBy'],
};
}
🤖 Prompt for AI Agents
In src/models/IssueRelation.ts around lines 137 to 148, the
IssueRelationToJSONTyped function currently returns an empty object which drops
all relation data; update it to emit the actual IssueRelation fields instead of
{} by returning a serialized representation of the incoming value (i.e.,
construct and return an object containing all properties present on the value
argument so callers receive the full relation payload).

Comment on lines +196 to +202
'archived_at': value['archivedAt'] == null ? undefined : ((value['archivedAt'] as any).toISOString().substring(0,10)),
'view_props': value['viewProps'],
'logo_props': value['logoProps'],
'external_id': value['externalId'],
'external_source': value['externalSource'],
'description_html': value['descriptionHtml'],
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Preserve archivedAt timestamp precision

Line 196 trims archivedAt to YYYY-MM-DD, discarding time and timezone. Serializing then deserializing will produce a different instant (new Date('2024-02-01') => local midnight), which breaks round-tripping and can shift the archived timestamp by several hours. Please emit the full ISO string and let the backend decide how to interpret it.

-        'archived_at': value['archivedAt'] == null ? undefined : ((value['archivedAt'] as any).toISOString().substring(0,10)),
+        'archived_at':
+            value['archivedAt'] === undefined
+                ? undefined
+                : value['archivedAt'] === null
+                    ? null
+                    : (value['archivedAt'] as Date).toISOString(),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'archived_at': value['archivedAt'] == null ? undefined : ((value['archivedAt'] as any).toISOString().substring(0,10)),
'view_props': value['viewProps'],
'logo_props': value['logoProps'],
'external_id': value['externalId'],
'external_source': value['externalSource'],
'description_html': value['descriptionHtml'],
};
'archived_at':
value['archivedAt'] === undefined
? undefined
: value['archivedAt'] === null
? null
: (value['archivedAt'] as Date).toISOString(),
'view_props': value['viewProps'],
'logo_props': value['logoProps'],
'external_id': value['externalId'],
'external_source': value['externalSource'],
'description_html': value['descriptionHtml'],
};
🤖 Prompt for AI Agents
In src/models/PageCreateAPI.ts around lines 196 to 202, the serializer currently
trims archivedAt to YYYY-MM-DD which drops time and timezone; change it to emit
the full ISO timestamp instead (keep the same null/undefined handling) so use
the value's full toISOString() (or pass through a string if already one) rather
than substring(0,10), ensuring the backend receives the full instant.

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