
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
granola-ts-client
Advanced tools
TypeScript client for the Granola API with automatic client validation bypass
TypeScript client for the Granola API.
npm install granola-ts-client
import GranolaClient from 'granola-ts-client';
const client = new GranolaClient('your-api-token');
// Get all documents
for await (const doc of client.listAllDocuments({ workspace_id: 'abc-123' })) {
console.log(doc.title);
}
getWorkspaces()
- Get user workspacesgetDocuments(options)
- Get documents with paginationgetDocumentMetadata(id)
- Get document metadatagetDocumentTranscript(id)
- Get document transcriptupdateDocument(id, updates)
- Update documentupdateDocumentPanel(id, panelId, content)
- Update document panelgetPanelTemplates()
- Get available panel templateslistAllDocuments(options)
- Iterate all documents (async generator)getPeople()
- Get people datagetFeatureFlags()
- Get feature flagsgetNotionIntegration()
- Get Notion integration detailsgetSubscriptions()
- Get subscription informationrefreshGoogleEvents()
- Refresh Google Calendar eventscheckForUpdate()
- Check for app updatesBackwards Compatibility: Legacy method names (e.g.,
v1_get_workspaces
) are supported automatically.
import GranolaClient from 'granola-ts-client';
const client = new GranolaClient('your-api-token');
// Get workspaces
const workspaces = await client.getWorkspaces();
console.log(`Found ${workspaces.workspaces.length} workspaces`);
// Get documents with pagination
const docs = await client.getDocuments({
workspace_id: workspaces.workspaces[0].id,
limit: 10
});
// Get document details
const metadata = await client.getDocumentMetadata(docs.docs[0].id);
const transcript = await client.getDocumentTranscript(docs.docs[0].id);
// Update a document
await client.updateDocument(docs.docs[0].id, {
title: 'Updated Title',
notes_markdown: '# Notes\n\nUpdated content'
});
// Process all documents in a workspace
for await (const doc of client.listAllDocuments({ workspace_id: 'abc-123' })) {
console.log(`Processing: ${doc.title}`);
// Process each document
}
// Or collect into an array
const allDocs = [];
for await (const doc of client.listAllDocuments({ workspace_id: 'abc-123' })) {
allDocs.push(doc);
}
# macOS - Try WorkOS token first (new auth)
jq -r '.workos_tokens | fromjson | .access_token' \
"$HOME/Library/Application Support/Granola/supabase.json"
# macOS - Fall back to Cognito token (legacy)
jq -r '.cognito_tokens | fromjson | .access_token' \
"$HOME/Library/Application Support/Granola/supabase.json"
# Linux
jq -r '.workos_tokens | fromjson | .access_token' \
"$HOME/.config/Granola/supabase.json"
import { extractGranolaToken } from 'granola-ts-client/utils';
const token = await extractGranolaToken();
const client = new GranolaClient(token);
Open developer console at app.granola.so and run:
await cookieStore.get('access_token')
# Install dependencies
bun install
# Run tests
bun test
# Build
bun run build
# Generate from OpenAPI spec
bun run generate
This library uses a stable wrapper pattern to protect against breaking changes from code generation. The public API methods (getWorkspaces
, getDocuments
, etc.) will never change, ensuring your code continues to work even when we regenerate the underlying client.
MIT
[0.11.2] - 2024-01-16
getDocumentTranscript
returning empty array when transcripts existgetPanelTemplates
returning empty array when templates exist/v1/get-document-transcript
and /v1/get-panel-templates
return arrays directly{transcript: [...]}
and {panel_templates: [...]}
)FAQs
TypeScript client for the Granola API with automatic client validation bypass
The npm package granola-ts-client receives a total of 24 weekly downloads. As such, granola-ts-client popularity was classified as not popular.
We found that granola-ts-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.