-
Notifications
You must be signed in to change notification settings - Fork 4
[SILO-934] feat: add advanced search endpoint for work items #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Prashant-Surya
wants to merge
1
commit into
main
Choose a base branch
from
feat/advanced-search
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| This is `@makeplane/plane-node-sdk` — a TypeScript SDK for the Plane API. It uses axios for HTTP, targets Node.js >=20, and is managed with pnpm@10.20.0. | ||
|
|
||
| ## Common Commands | ||
|
|
||
| ```bash | ||
| pnpm install # Install dependencies | ||
| pnpm build # Compile TS + bundle type definitions | ||
| pnpm dev # Watch mode for development | ||
| pnpm test # Run all tests (Jest) | ||
| pnpm test:unit # Unit tests only | ||
| pnpm test:e2e # E2E tests only | ||
| pnpm test -- --testPathPattern=tests/unit/project # Run a single test file | ||
| pnpm test:coverage # Run with coverage report | ||
| pnpm check:lint # Lint check (ESLint) | ||
| pnpm fix:lint # Auto-fix lint issues | ||
| pnpm check:format # Format check (Prettier, 120 char width) | ||
| pnpm fix:format # Auto-format | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
|
||
| Tests live in `tests/unit/` and `tests/e2e/`. Tests require a `.env.test` file (copy from `env.example`) with real workspace/project IDs. Tests run sequentially (`maxWorkers: 1`) to avoid API rate limits. Jest uses `tsconfig.jest.json` via ts-jest. | ||
|
|
||
| ## Architecture | ||
|
|
||
| **Entry point**: `src/index.ts` re-exports everything. The main consumer-facing class is `PlaneClient` (`src/client/plane-client.ts`), which instantiates all API resources with shared `Configuration`. | ||
|
|
||
| **BaseResource pattern** (`src/api/BaseResource.ts`): Abstract base class providing HTTP methods (get, post, patch, put, httpDelete) via axios. All API resource classes extend it. Handles both `apiKey` (X-Api-Key header) and `accessToken` (Bearer token) auth. Includes optional request/response logging with sensitive data sanitization. | ||
|
|
||
| **API resources** (`src/api/`): Each resource class extends BaseResource. Some have sub-resources as separate classes composed by the parent: | ||
| - `WorkItems/` → Comments, Attachments, Activities, Relations, WorkLogs | ||
| - `Customers/` → Properties, Requests | ||
| - `Teamspaces/` → Members, Projects | ||
| - `Initiatives/` → Labels, Projects, Epics | ||
| - `AgentRuns/` → Activities | ||
| - `WorkItemProperties/` → Options, Values | ||
|
|
||
| **Models** (`src/models/`): TypeScript interfaces for each entity with separate Create/Update DTOs. Uses `Pick`, `Omit`, and `Partial` for DTO derivation. Notable: `WorkItem` uses a generic expandable fields pattern (`WorkItem<E extends WorkItemExpandableFieldName = never>`). | ||
|
|
||
| **Errors** (`src/errors/`): `PlaneError` (base) → `HttpError` (HTTP-specific with status code and response data). | ||
|
|
||
| **OAuth**: Standalone `OAuthClient` (`src/client/oauth-client.ts`) handles authorization flows, token exchange, and refresh separately from the main SDK auth. | ||
|
|
||
| ## Conventions | ||
|
|
||
| - All API endpoint URLs must end with `/` | ||
| - Standard resource methods: `list`, `create`, `retrieve`, `update`, `del` | ||
| - Never use "Issue" in names — always use "Work Item" | ||
| - File naming: kebab-case for files, PascalCase for classes, camelCase for methods | ||
| - Avoid `any` types; use proper typing or `unknown` with type guards | ||
| - Build produces `dist/` with compiled JS, declarations, source maps, and a bundled `types.bundle.d.ts` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.