{"owner":"makenotion","repo":"notion-sdk-js","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Repository Overview\n\nOfficial Notion SDK for JavaScript - a TypeScript client library providing type-safe access to the Notion API.\n\n- **Package**: `@notionhq/client`\n- **Target Runtime**: Node.js ≥ 18\n- **TypeScript**: ≥ 5.9\n- **Build System**: TypeScript compiler (tsc)\n- **Test Framework**: Jest with ts-jest\n\n## Development Commands\n\n### Building\n\n```bash\nnpm run build          # Runs: npm run clean && tsc\nnpm run clean          # Remove build/ directory\n```\n\n### Testing\n\n```bash\nnpm test               # Run all tests in test/\n```\n\nTo run a single test file:\n\n```bash\nnpx jest test/helpers.test.ts\n```\n\n### Linting and Formatting\n\n```bash\nnpm run lint           # Runs prettier, eslint, and cspell\nnpm run prettier       # Format code with prettier\n```\n\n### Examples\n\n```bash\nnpm run install:examples     # Install dependencies for all example projects\nnpm run examples:typecheck   # Type-check all examples\n```\n\n## Code Architecture\n\n### Client Structure\n\nThe SDK is organized around a central `Client` class (src/Client.ts) that exposes namespaced endpoints:\n\n- `client.blocks` - Block CRUD operations and children management\n- `client.databases` - Database CRUD operations\n- `client.dataSources` - Data source operations and querying\n- `client.pages` - Page CRUD operations and property retrieval\n- `client.users` - User listing and retrieval\n- `client.comments` - Comment CRUD operations\n- `client.fileUploads` - File upload lifecycle (create, send, complete, list)\n- `client.oauth` - OAuth token, introspect, and revoke operations\n- `client.search()` - Search across workspace\n\nEach endpoint namespace contains methods like `retrieve`, `create`, `update`, `delete`, and `list` as appropriate. Child resources use nested objects (e.g., `client.blocks.children.list()`).\n\n### Request Flow\n\nAll API calls flow through `Client.request()` which:\n\n1. Constructs the full URL from `baseUrl` + `path`\n2. Validates path against traversal attacks\n3. Adds authentication headers (from client-level `auth` or request-level override)\n4. Sets `Notion-Version` header (defaults to \"2025-09-03\")\n5. Handles request timeout (default 60s)\n6. Automatically retries on transient errors (rate limits, server errors)\n7. Processes response or throws typed errors\n\n### Retry Behavior\n\nThe client automatically retries failed requests for these error codes:\n\n- `rate_limited` (HTTP 429) - retried for all HTTP methods; respects `retry-after` header if present\n- `service_overload` (HTTP 529) - retried for all HTTP methods; respects `retry-after` header if present\n- `internal_server_error` (HTTP 500) - retried only for idempotent methods (GET, DELETE)\n- `service_unavailable` (HTTP 503) - retried only for idempotent methods (GET, DELETE)\n\nServer errors (500, 503) are only retried for idempotent methods to avoid duplicate side effects. Rate limits (429) and service overloads (529) are retried for all methods since the server explicitly asks clients to retry.\n\nConfiguration via `ClientOptions.retry`:\n\n```typescript\nconst client = new Client({\n  auth: \"secret_...\",\n  retry: {\n    maxRetries: 2, // Default: 2 retry attempts\n    initialRetryDelayMs: 1000, // Default: 1 second base delay\n    maxRetryDelayMs: 60000, // Default: 60 second cap\n  },\n})\n\n// Or disable retries entirely:\nconst client = new Client({ auth: \"secret_...\", retry: false })\n```\n\nWhen `retry-after` header is present, the client waits for that duration (capped by `maxRetryDelayMs`). Otherwise, it uses exponential back-off with jitter.\n\n### Type System\n\n**Generated Types** (`src/api-endpoints.ts`):\n\n- **DO NOT EDIT** - This file is auto-generated from the Notion API specification\n- Contains all request/response types and endpoint definitions\n- Each endpoint exports: `Parameters`, `Response` types, and a descriptor with `path`, `method`, `queryParams`, `bodyParams`\n\n**Type Guards** (`src/type-utils.ts` and `src/helpers.ts`):\n\n- `isFullPage()`, `isFullBlock()`, `isFullDataSource()`, `isFullUser()`, `isFullComment()`\n- `isFullPageOrDataSource()` - handles union types\n- `isNotionClientError()` - for error handling\n\n**ID Extraction** (`src/helpers.ts`):\n\n- `extractNotionId()`, `extractPageId()`, `extractDatabaseId()`, `extractBlockId()`\n- Extract IDs from Notion URLs or format raw IDs\n\n### Error Handling\n\nFour error types (all in `src/errors.ts`):\n\n- `APIResponseError` - HTTP errors from Notion API with error codes from `APIErrorCode`\n- `RequestTimeoutError` - Request exceeded timeout\n- `UnknownHTTPResponseError` - Unexpected HTTP responses\n- `InvalidPathParameterError` - Path contains traversal sequences\n\nError codes are in two enums:\n\n- `APIErrorCode` - Server-side errors (unauthorized, rate_limited, object_not_found, etc.)\n- `ClientErrorCode` - Client-side errors (request_timeout, response_error, invalid_path_parameter)\n\nType guards for error handling:\n\n- `isNotionClientError(error)` - Check if error is any SDK error\n- `isHTTPResponseError(error)` - Check if error is an HTTP response error (has status, headers, body)\n- `APIResponseError.isAPIResponseError(error)` - Check for API-specific errors\n\n### Pagination\n\nTwo utilities in `src/helpers.ts`:\n\n- `iteratePaginatedAPI()` - Async iterator for memory-efficient pagination\n- `collectPaginatedAPI()` - Collects all results into array (use for small datasets)\n\nBoth accept a list function and parameters, automatically handling `start_cursor`/`next_cursor`.\n\n### Logging\n\nConfigurable logging system (`src/logging.ts`):\n\n- Four levels: DEBUG, INFO, WARN, ERROR (via `LogLevel` enum)\n- Default: WARN level to console\n- Custom loggers via `logger` option (receives level, message, extraInfo)\n- Debug mode logs full request/response bodies\n\n## Important Constraints\n\n### DO NOT EDIT\n\n- `src/api-endpoints.ts` - Auto-generated from API spec (see file header)\n- `build/` directory - Compiled output\n\n### Code Style\n\n- **NO semicolons** (enforced by Prettier)\n- **NO redundant comments** - Only add comments explaining \"why\", not \"what\"\n- **NO `as any`** - Use type guards from `src/type-utils.ts`\n- Comment length: max 80 characters per line\n- Use CommonJS (`require`/`module.exports`) not ES6 imports\n\n### Spelling Checks (cspell)\n\nThe linter runs cspell for spell checking. Avoid non-dictionary terms in code:\n\n- Use \"back-off\" instead of \"back off\" (single word)\n- Use \"parsable\" instead of \"parse able\" variants\n- Prefer standard English words in method names and comments\n\n### Testing Requirements\n\n- Always run `npm run build && npm test` before committing\n- Add tests for new functionality in `test/`\n- CI validates on Node.js 18, 19, 20, 22\n\n### Publishing Workflow\n\n```bash\nnpm run prepublishOnly  # Runs: checkLoggedIn && lint && test\n```\n\n## Key Files\n\n- `src/Client.ts` - Main client implementation with all endpoint namespaces and retry logic\n- `src/index.ts` - Public API surface (all exports)\n- `src/api-endpoints.ts` - Generated API types and endpoint descriptors\n- `src/errors.ts` - Error types and error handling utilities\n- `src/helpers.ts` - Pagination utilities and type guards\n- `src/type-utils.ts` - TypeScript type guards and utilities\n- `src/logging.ts` - Logging system\n- `src/utils.ts` - Internal utilities (pick, isObject)\n- `src/fetch-types.ts` - Fetch API type definitions (uses `unknown` for headers to support various fetch implementations)\n\n## Making Changes\n\n### Adding New Functionality\n\n1. Implement in appropriate source file\n2. Add exports to `src/index.ts`\n3. Add tests in `test/`\n4. Run `npm run build && npm test`\n5. Run `npm run lint` to validate formatting and spelling\n\n### Working with API Endpoints\n\n- API endpoint changes must come from upstream (api-endpoints.ts is generated)\n- New endpoint types are automatically available once api-endpoints.ts is regenerated\n- Wire up new endpoints in Client.ts following existing patterns\n\n### Type Guards\n\nIf adding response type discriminators, add type guard functions to `src/helpers.ts` following the `isFullX()` pattern and export from `src/index.ts`.\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Repository Overview\n\nOfficial Notion SDK for JavaScript - a TypeScript client library providing type-safe access to the Notion API.\n\n- **Package**: `@notionhq/client`\n- **Target Runtime**: Node.js ≥ 18\n- **TypeScript**: ≥ 5.9\n- **Build System**: TypeScript compiler (tsc)\n- **Test Framework**: Jest with ts-jest\n\n## Development Commands\n\n### Building\n\n```bash\nnpm run build          # Runs: npm run clean && tsc\nnpm run clean          # Remove build/ directory\n```\n\n### Testing\n\n```bash\nnpm test               # Run all tests in test/\n```\n\nTo run a single test file:\n\n```bash\nnpx jest test/helpers.test.ts\n```\n\n### Linting and Formatting\n\n```bash\nnpm run lint           # Runs prettier, eslint, and cspell\nnpm run prettier       # Format code with prettier\n```\n\n### Examples\n\n```bash\nnpm run install:examples     # Install dependencies for all example projects\nnpm run examples:typecheck   # Type-check all examples\n```\n\n## Code Architecture\n\n### Client Structure\n\nThe SDK is organized around a central `Client` class (src/Client.ts) that exposes namespaced endpoints:\n\n- `client.blocks` - Block CRUD operations and children management\n- `client.databases` - Database CRUD operations\n- `client.dataSources` - Data source operations and querying\n- `client.pages` - Page CRUD operations and property retrieval\n- `client.users` - User listing and retrieval\n- `client.comments` - Comment CRUD operations\n- `client.fileUploads` - File upload lifecycle (create, send, complete, list)\n- `client.oauth` - OAuth token, introspect, and revoke operations\n- `client.search()` - Search across workspace\n\nEach endpoint namespace contains methods like `retrieve`, `create`, `update`, `delete`, and `list` as appropriate. Child resources use nested objects (e.g., `client.blocks.children.list()`).\n\n### Request Flow\n\nAll API calls flow through `Client.request()` which:\n\n1. Constructs the full URL from `baseUrl` + `path`\n2. Validates path against traversal attacks\n3. Adds authentication headers (from client-level `auth` or request-level override)\n4. Sets `Notion-Version` header (defaults to \"2025-09-03\")\n5. Handles request timeout (default 60s)\n6. Automatically retries on transient errors (rate limits, server errors)\n7. Processes response or throws typed errors\n\n### Retry Behavior\n\nThe client automatically retries failed requests for these error codes:\n\n- `rate_limited` (HTTP 429) - retried for all HTTP methods; respects `retry-after` header if present\n- `service_overload` (HTTP 529) - retried for all HTTP methods; respects `retry-after` header if present\n- `internal_server_error` (HTTP 500) - retried only for idempotent methods (GET, DELETE)\n- `service_unavailable` (HTTP 503) - retried only for idempotent methods (GET, DELETE)\n\nServer errors (500, 503) are only retried for idempotent methods to avoid duplicate side effects. Rate limits (429) and service overloads (529) are retried for all methods since the server explicitly asks clients to retry.\n\nConfiguration via `ClientOptions.retry`:\n\n```typescript\nconst client = new Client({\n  auth: \"secret_...\",\n  retry: {\n    maxRetries: 2, // Default: 2 retry attempts\n    initialRetryDelayMs: 1000, // Default: 1 second base delay\n    maxRetryDelayMs: 60000, // Default: 60 second cap\n  },\n})\n\n// Or disable retries entirely:\nconst client = new Client({ auth: \"secret_...\", retry: false })\n```\n\nWhen `retry-after` header is present, the client waits for that duration (capped by `maxRetryDelayMs`). Otherwise, it uses exponential back-off with jitter.\n\n### Type System\n\n**Generated Types** (`src/api-endpoints.ts`):\n\n- **DO NOT EDIT** - This file is auto-generated from the Notion API specification\n- Contains all request/response types and endpoint definitions\n- Each endpoint exports: `Parameters`, `Response` types, and a descriptor with `path`, `method`, `queryParams`, `bodyParams`\n\n**Type Guards** (`src/type-utils.ts` and `src/helpers.ts`):\n\n- `isFullPage()`, `isFullBlock()`, `isFullDataSource()`, `isFullUser()`, `isFullComment()`\n- `isFullPageOrDataSource()` - handles union types\n- `isNotionClientError()` - for error handling\n\n**ID Extraction** (`src/helpers.ts`):\n\n- `extractNotionId()`, `extractPageId()`, `extractDatabaseId()`, `extractBlockId()`\n- Extract IDs from Notion URLs or format raw IDs\n\n### Error Handling\n\nFour error types (all in `src/errors.ts`):\n\n- `APIResponseError` - HTTP errors from Notion API with error codes from `APIErrorCode`\n- `RequestTimeoutError` - Request exceeded timeout\n- `UnknownHTTPResponseError` - Unexpected HTTP responses\n- `InvalidPathParameterError` - Path contains traversal sequences\n\nError codes are in two enums:\n\n- `APIErrorCode` - Server-side errors (unauthorized, rate_limited, object_not_found, etc.)\n- `ClientErrorCode` - Client-side errors (request_timeout, response_error, invalid_path_parameter)\n\nType guards for error handling:\n\n- `isNotionClientError(error)` - Check if error is any SDK error\n- `isHTTPResponseError(error)` - Check if error is an HTTP response error (has status, headers, body)\n- `APIResponseError.isAPIResponseError(error)` - Check for API-specific errors\n\n### Pagination\n\nTwo utilities in `src/helpers.ts`:\n\n- `iteratePaginatedAPI()` - Async iterator for memory-efficient pagination\n- `collectPaginatedAPI()` - Collects all results into array (use for small datasets)\n\nBoth accept a list function and parameters, automatically handling `start_cursor`/`next_cursor`.\n\n### Logging\n\nConfigurable logging system (`src/logging.ts`):\n\n- Four levels: DEBUG, INFO, WARN, ERROR (via `LogLevel` enum)\n- Default: WARN level to console\n- Custom loggers via `logger` option (receives level, message, extraInfo)\n- Debug mode logs full request/response bodies\n\n## Important Constraints\n\n### DO NOT EDIT\n\n- `src/api-endpoints.ts` - Auto-generated from API spec (see file header)\n- `build/` directory - Compiled output\n\n### Code Style\n\n- **NO semicolons** (enforced by Prettier)\n- **NO redundant comments** - Only add comments explaining \"why\", not \"what\"\n- **NO `as any`** - Use type guards from `src/type-utils.ts`\n- Comment length: max 80 characters per line\n- Use CommonJS (`require`/`module.exports`) not ES6 imports\n\n### Spelling Checks (cspell)\n\nThe linter runs cspell for spell checking. Avoid non-dictionary terms in code:\n\n- Use \"back-off\" instead of \"back off\" (single word)\n- Use \"parsable\" instead of \"parse able\" variants\n- Prefer standard English words in method names and comments\n\n### Testing Requirements\n\n- Always run `npm run build && npm test` before committing\n- Add tests for new functionality in `test/`\n- CI validates on Node.js 18, 19, 20, 22\n\n### Publishing Workflow\n\n```bash\nnpm run prepublishOnly  # Runs: checkLoggedIn && lint && test\n```\n\n## Key Files\n\n- `src/Client.ts` - Main client implementation with all endpoint namespaces and retry logic\n- `src/index.ts` - Public API surface (all exports)\n- `src/api-endpoints.ts` - Generated API types and endpoint descriptors\n- `src/errors.ts` - Error types and error handling utilities\n- `src/helpers.ts` - Pagination utilities and type guards\n- `src/type-utils.ts` - TypeScript type guards and utilities\n- `src/logging.ts` - Logging system\n- `src/utils.ts` - Internal utilities (pick, isObject)\n- `src/fetch-types.ts` - Fetch API type definitions (uses `unknown` for headers to support various fetch implementations)\n\n## Making Changes\n\n### Adding New Functionality\n\n1. Implement in appropriate source file\n2. Add exports to `src/index.ts`\n3. Add tests in `test/`\n4. Run `npm run build && npm test`\n5. Run `npm run lint` to validate formatting and spelling\n\n### Working with API Endpoints\n\n- API endpoint changes must come from upstream (api-endpoints.ts is generated)\n- New endpoint types are automatically available once api-endpoints.ts is regenerated\n- Wire up new endpoints in Client.ts following existing patterns\n\n### Type Guards\n\nIf adding response type discriminators, add type guard functions to `src/helpers.ts` following the `isFullX()` pattern and export from `src/index.ts`.\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Repository Overview\n\nOfficial Notion SDK for JavaScript - a TypeScript client library providing type-safe access to the Notion API.\n\n- **Package**: `@notionhq/client`\n- **Target Runtime**: Node.js ≥ 18\n- **TypeScript**: ≥ 5.9\n- **Build System**: TypeScript compiler (tsc)\n- **Test Framework**: Jest with ts-jest\n\n## Development Commands\n\n### Building\n\n```bash\nnpm run build          # Runs: npm run clean && tsc\nnpm run clean          # Remove build/ directory\n```\n\n### Testing\n\n```bash\nnpm test               # Run all tests in test/\n```\n\nTo run a single test file:\n\n```bash\nnpx jest test/helpers.test.ts\n```\n\n### Linting and Formatting\n\n```bash\nnpm run lint           # Runs prettier, eslint, and cspell\nnpm run prettier       # Format code with prettier\n```\n\n### Examples\n\n```bash\nnpm run install:examples     # Install dependencies for all example projects\nnpm run examples:typecheck   # Type-check all examples\n```\n\n## Code Architecture\n\n### Client Structure\n\nThe SDK is organized around a central `Client` class (src/Client.ts) that exposes namespaced endpoints:\n\n- `client.blocks` - Block CRUD operations and children management\n- `client.databases` - Database CRUD operations\n- `client.dataSources` - Data source operations and querying\n- `client.pages` - Page CRUD operations and property retrieval\n- `client.users` - User listing and retrieval\n- `client.comments` - Comment CRUD operations\n- `client.fileUploads` - File upload lifecycle (create, send, complete, list)\n- `client.oauth` - OAuth token, introspect, and revoke operations\n- `client.search()` - Search across workspace\n\nEach endpoint namespace contains methods like `retrieve`, `create`, `update`, `delete`, and `list` as appropriate. Child resources use nested objects (e.g., `client.blocks.children.list()`).\n\n### Request Flow\n\nAll API calls flow through `Client.request()` which:\n\n1. Constructs the full URL from `baseUrl` + `path`\n2. Validates path against traversal attacks\n3. Adds authentication headers (from client-level `auth` or request-level override)\n4. Sets `Notion-Version` header (defaults to \"2025-09-03\")\n5. Handles request timeout (default 60s)\n6. Automatically retries on transient errors (rate limits, server errors)\n7. Processes response or throws typed errors\n\n### Retry Behavior\n\nThe client automatically retries failed requests for these error codes:\n\n- `rate_limited` (HTTP 429) - retried for all HTTP methods; respects `retry-after` header if present\n- `service_overload` (HTTP 529) - retried for all HTTP methods; respects `retry-after` header if present\n- `internal_server_error` (HTTP 500) - retried only for idempotent methods (GET, DELETE)\n- `service_unavailable` (HTTP 503) - retried only for idempotent methods (GET, DELETE)\n\nServer errors (500, 503) are only retried for idempotent methods to avoid duplicate side effects. Rate limits (429) and service overloads (529) are retried for all methods since the server explicitly asks clients to retry.\n\nConfiguration via `ClientOptions.retry`:\n\n```typescript\nconst client = new Client({\n  auth: \"secret_...\",\n  retry: {\n    maxRetries: 2, // Default: 2 retry attempts\n    initialRetryDelayMs: 1000, // Default: 1 second base delay\n    maxRetryDelayMs: 60000, // Default: 60 second cap\n  },\n})\n\n// Or disable retries entirely:\nconst client = new Client({ auth: \"secret_...\", retry: false })\n```\n\nWhen `retry-after` header is present, the client waits for that duration (capped by `maxRetryDelayMs`). Otherwise, it uses exponential back-off with jitter.\n\n### Type System\n\n**Generated Types** (`src/api-endpoints.ts`):\n\n- **DO NOT EDIT** - This file is auto-generated from the Notion API specification\n- Contains all request/response types and endpoint definitions\n- Each endpoint exports: `Parameters`, `Response` types, and a descriptor with `path`, `method`, `queryParams`, `bodyParams`\n\n**Type Guards** (`src/type-utils.ts` and `src/helpers.ts`):\n\n- `isFullPage()`, `isFullBlock()`, `isFullDataSource()`, `isFullUser()`, `isFullComment()`\n- `isFullPageOrDataSource()` - handles union types\n- `isNotionClientError()` - for error handling\n\n**ID Extraction** (`src/helpers.ts`):\n\n- `extractNotionId()`, `extractPageId()`, `extractDatabaseId()`, `extractBlockId()`\n- Extract IDs from Notion URLs or format raw IDs\n\n### Error Handling\n\nFour error types (all in `src/errors.ts`):\n\n- `APIResponseError` - HTTP errors from Notion API with error codes from `APIErrorCode`\n- `RequestTimeoutError` - Request exceeded timeout\n- `UnknownHTTPResponseError` - Unexpected HTTP responses\n- `InvalidPathParameterError` - Path contains traversal sequences\n\nError codes are in two enums:\n\n- `APIErrorCode` - Server-side errors (unauthorized, rate_limited, object_not_found, etc.)\n- `ClientErrorCode` - Client-side errors (request_timeout, response_error, invalid_path_parameter)\n\nType guards for error handling:\n\n- `isNotionClientError(error)` - Check if error is any SDK error\n- `isHTTPResponseError(error)` - Check if error is an HTTP response error (has status, headers, body)\n- `APIResponseError.isAPIResponseError(error)` - Check for API-specific errors\n\n### Pagination\n\nTwo utilities in `src/helpers.ts`:\n\n- `iteratePaginatedAPI()` - Async iterator for memory-efficient pagination\n- `collectPaginatedAPI()` - Collects all results into array (use for small datasets)\n\nBoth accept a list function and parameters, automatically handling `start_cursor`/`next_cursor`.\n\n### Logging\n\nConfigurable logging system (`src/logging.ts`):\n\n- Four levels: DEBUG, INFO, WARN, ERROR (via `LogLevel` enum)\n- Default: WARN level to console\n- Custom loggers via `logger` option (receives level, message, extraInfo)\n- Debug mode logs full request/response bodies\n\n## Important Constraints\n\n### DO NOT EDIT\n\n- `src/api-endpoints.ts` - Auto-generated from API spec (see file header)\n- `build/` directory - Compiled output\n\n### Code Style\n\n- **NO semicolons** (enforced by Prettier)\n- **NO redundant comments** - Only add comments explaining \"why\", not \"what\"\n- **NO `as any`** - Use type guards from `src/type-utils.ts`\n- Comment length: max 80 characters per line\n- Use CommonJS (`require`/`module.exports`) not ES6 imports\n\n### Spelling Checks (cspell)\n\nThe linter runs cspell for spell checking. Avoid non-dictionary terms in code:\n\n- Use \"back-off\" instead of \"back off\" (single word)\n- Use \"parsable\" instead of \"parse able\" variants\n- Prefer standard English words in method names and comments\n\n### Testing Requirements\n\n- Always run `npm run build && npm test` before committing\n- Add tests for new functionality in `test/`\n- CI validates on Node.js 18, 19, 20, 22\n\n### Publishing Workflow\n\n```bash\nnpm run prepublishOnly  # Runs: checkLoggedIn && lint && test\n```\n\n## Key Files\n\n- `src/Client.ts` - Main client implementation with all endpoint namespaces and retry logic\n- `src/index.ts` - Public API surface (all exports)\n- `src/api-endpoints.ts` - Generated API types and endpoint descriptors\n- `src/errors.ts` - Error types and error handling utilities\n- `src/helpers.ts` - Pagination utilities and type guards\n- `src/type-utils.ts` - TypeScript type guards and utilities\n- `src/logging.ts` - Logging system\n- `src/utils.ts` - Internal utilities (pick, isObject)\n- `src/fetch-types.ts` - Fetch API type definitions (uses `unknown` for headers to support various fetch implementations)\n\n## Making Changes\n\n### Adding New Functionality\n\n1. Implement in appropriate source file\n2. Add exports to `src/index.ts`\n3. Add tests in `test/`\n4. Run `npm run build && npm test`\n5. Run `npm run lint` to validate formatting and spelling\n\n### Working with API Endpoints\n\n- API endpoint changes must come from upstream (api-endpoints.ts is generated)\n- New endpoint types are automatically available once api-endpoints.ts is regenerated\n- Wire up new endpoints in Client.ts following existing patterns\n\n### Type Guards\n\nIf adding response type discriminators, add type guard functions to `src/helpers.ts` following the `isFullX()` pattern and export from `src/index.ts`.\n","category":"root","tokens":2026}]}