npx openapi-typescript http://localhost:4000/api-yaml -o ./src/lib/api.def.ts
npm install @capibox/bridge-nextjs-client ## DEV
npx openapi-typescript http://localhost:4000/api-yaml -o ./src/lib/api.def.ts
``
at docs/browser/session/create.md create sample calls for browser.session.create function
Include samples with all required params and then with all optional params (if exists)
Include short description for each sample.
Include response examples.
`
Requirements:
- Node.js 18+ (for built-in fetch). If using older Node, install either node-fetch or undici in your environment.
- A ClickUp API token with permission to modify the target Doc/Page.
Environment variables and CLI options:
- You can put these in a .env file at the project root; the script auto-loads it.
- CLICKUP_TOKEN or --token
- CLICKUP_DOC_ID or --docId
- Optional CLICKUP_PAGE_ID or --pageId
- Optional CLICKUP_API_BASE or --endpoint
- Optional --title
- Optional --dryRun (prints payload without calling the API)
Usage examples:
- npx: npm run clickup:upload-md -- --file docs/browser/session/create.md --docId CLICKUP_TOKEN=xxx CLICKUP_DOC_ID=yyy npm run clickup:upload-md -- --file ./README.md
- With env vars: npm run clickup:upload-md -- --file ./README.md --docId
- With page:
Notes:
- The script converts Markdown to basic HTML before uploading as content`. If your workspace expects a different payload shape for Docs, adjust the script accordingly.