Registry / database / weave-typescript

weave-typescript

JSON →
library0.50.0jsnpmunverified

TypeScript bindings for the Weave platform, including generated protobuf message types, gRPC service clients (via @grpc/grpc-js and @bufbuild/protobuf), and strongly-typed Postgres query helpers generated with sqlc for WeaveSQL datasets. Released under 0.x versions with active development; new features and breaking changes expected as the platform evolves. Differentiates from generic gRPC clients by providing tailored service definitions and SQL integrations for Weave services.

npm install weave-typescript
INSTALL
IMPORT
SIG · WEAVE-TYPESCRIPT
W
weave-typescript
databasejavascriptv0.50.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

auth
import { auth } from 'weave-typescript'
const auth = require('weave-typescript').auth
ESM-only; use dynamic import for CommonJS.
getModel
import { getModel } from 'weave-typescript/weavesql/llmxdb/models_sql'
import { getModel } from 'weave-typescript'
Query helpers are not re-exported from root; import specific path.
AuthClient
import { auth } from 'weave-typescript'; const client = new auth.AuthClient(...)
import { AuthClient } from 'weave-typescript'
AuthClient is a nested symbol under auth namespace.

Initializes a gRPC AuthClient and initiates OAuth flow with GitHub.

import { credentials } from "@grpc/grpc-js"; import { auth } from "weave-typescript"; const client = new auth.AuthClient( "api.weave.com:443", credentials.createSsl() ); client.initiateOAuth( { provider: "github", redirectUri: "https://example.com/oauth/callback", state: "csrf-token", scope: "openid profile email", providerParams: {}, }, (err, response) => { if (err) throw err; console.log(response.authUrl); } );
Debug
Known issues
breakingBreaking changes in minor versions due to 0.x semver
fix
Pin exact version during development and check changelog before upgrades.
affects: >=0.0.0 <1.0.0
gotchaQuery helpers not exported from root; must import from specific subpath
fix
Use full path like 'weave-typescript/weavesql/llmxdb/models_sql'.
affects: >=0.0.0
gotchaService clients are nested under namespace, not top-level
fix
Access as e.g. auth.AuthClient, not separate named import.
affects: >=0.0.0
deprecatedPotential deprecation of old service modules without notice
fix
Use generated modules under src/weaveapi/ as stable reference.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'weave-typescript' or its corresponding type declarations.
Package not installes or not compiled.
fix
Run `npm install weave-typescript` and ensure build step emits dist/.
TypeError: auth.AuthClient is not a constructor
Incorrect import path or namespace access.
fix
Use correct import: `import { auth } from 'weave-typescript'` then `new auth.AuthClient(...)`.
Cannot find module 'weave-typescript/weavesql/llmxdb/models_sql'
Missing SQL helpers or path error.
fix
Ensure package is built with SQL generation, and use exact subpath.
Upgrade
Version history
0.50.0latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredgRPC client runtime
@bufbuild/protobufrequiredProtobuf message handling
pgrequiredPostgres client for WeaveSQL helpers
Agent activity
24 hits · last 30 days
node
20
Meta
2
Amazon
1
OpenAI (training)
1
Resources
weave-typescript — npm install weave-typescript · libregistry