TypeScript client for the Pennylane Accounting API, auto-generated from OpenAPI spec
npm install @getyetty-sdk/pennylaneTypeScript client for the Pennylane Accounting API, auto-generated from the official OpenAPI specification.
This package is not officially maintained by Pennylane. It is auto-generated from the publicly available OpenAPI specification. While we strive to keep it up-to-date through daily automated updates, there may be occasional discrepancies or delays.
Use at your own risk. For production applications, always test thoroughly and consider the official Pennylane documentation as the source of truth.
- 🔒 Fully typed TypeScript client
- 🤖 Auto-generated from the official Pennylane OpenAPI spec
- 🔄 Daily automated updates to stay in sync with API changes
- 📦 Tree-shakable, zero runtime dependencies (standalone bundle)
- 🚀 ESM module
- Node.js >= 24.0.0
``bash`
npm install @getyetty-sdk/pennylane
`typescript
import { client } from '@getyetty-sdk/pennylane';
// Configure the default client with your API key
client.setConfig({
baseUrl: 'https://app.pennylane.com/',
headers: {
Authorization: Bearer ${process.env.PENNYLANE_API_KEY},`
},
});
`typescript
import { getCustomers, getCustomer, postCompanyCustomer } from '@getyetty-sdk/pennylane';
// List customers
const customers = await getCustomers({
query: {
page: 1,
per_page: 20,
},
});
// Get a specific customer
const customer = await getCustomer({
path: {
id: 'customer-id',
},
});
// Create a new customer
const newCustomer = await postCompanyCustomer({
body: {
// customer data
},
});
`
`typescript
import {
createClient,
createClientWithApiKey,
createConfig,
getCustomers,
} from '@getyetty-sdk/pennylane';
const pennylane = createClient(
createConfig({
baseUrl: 'https://app.pennylane.com/',
headers: {
Authorization: Bearer ${process.env.PENNYLANE_API_KEY},
},
}),
);
// Or alternatively if you just have to provide an API key
const pennylane = createClientWithApiKey(process.env.PENNYLANE_API_KEY);
// Use the custom client
const customers = await getCustomers({
client: pennylane,
query: { page: 1 },
});
``
For detailed API documentation, please refer to the official Pennylane API docs.
MIT