@getyetty-sdk/pennylane 2026.1.16-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/index.d.mts +30442 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4486 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GetYetty
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# @getyetty-sdk/pennylane
|
|
2
|
+
|
|
3
|
+
TypeScript client for the [Pennylane Accounting API](https://pennylane.readme.io/reference/introduction), auto-generated from the official OpenAPI specification.
|
|
4
|
+
|
|
5
|
+
## ⚠️ Disclaimer
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
Use at your own risk. For production applications, always test thoroughly and consider the official Pennylane documentation as the source of truth.
|
|
10
|
+
|
|
11
|
+
## ✨ Features
|
|
12
|
+
|
|
13
|
+
- 🔒 Fully typed TypeScript client
|
|
14
|
+
- 🤖 Auto-generated from the official Pennylane OpenAPI spec
|
|
15
|
+
- 🔄 Daily automated updates to stay in sync with API changes
|
|
16
|
+
- 📦 Tree-shakable, zero runtime dependencies (standalone bundle)
|
|
17
|
+
- 🚀 ESM module
|
|
18
|
+
|
|
19
|
+
## 📋 Requirements
|
|
20
|
+
|
|
21
|
+
- Node.js >= 24.0.0
|
|
22
|
+
|
|
23
|
+
## 📥 Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @getyetty-sdk/pennylane
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 🛠️ Usage
|
|
30
|
+
|
|
31
|
+
### Basic Setup
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { client } from '@getyetty-sdk/pennylane';
|
|
35
|
+
|
|
36
|
+
// Configure the default client with your API key
|
|
37
|
+
client.setConfig({
|
|
38
|
+
baseUrl: 'https://app.pennylane.com/api/external/v1',
|
|
39
|
+
headers: {
|
|
40
|
+
Authorization: `Bearer ${process.env.PENNYLANE_API_KEY}`,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Making API Calls
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { getCustomers, getCustomer, postCompanyCustomer } from '@getyetty-sdk/pennylane';
|
|
49
|
+
|
|
50
|
+
// List customers
|
|
51
|
+
const customers = await getCustomers({
|
|
52
|
+
query: {
|
|
53
|
+
page: 1,
|
|
54
|
+
per_page: 20,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Get a specific customer
|
|
59
|
+
const customer = await getCustomer({
|
|
60
|
+
path: {
|
|
61
|
+
id: 'customer-id',
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Create a new customer
|
|
66
|
+
const newCustomer = await postCompanyCustomer({
|
|
67
|
+
body: {
|
|
68
|
+
// customer data
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Creating a Custom Client Instance
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import { createClient, createConfig, getCustomers } from '@getyetty-sdk/pennylane';
|
|
77
|
+
|
|
78
|
+
const pennylane = createClient(
|
|
79
|
+
createConfig({
|
|
80
|
+
baseUrl: 'https://app.pennylane.com/api/external/v1',
|
|
81
|
+
headers: {
|
|
82
|
+
Authorization: `Bearer ${process.env.PENNYLANE_API_KEY}`,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
// Use the custom client
|
|
88
|
+
const customers = await getCustomers({
|
|
89
|
+
client: pennylane,
|
|
90
|
+
query: { page: 1 },
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 📚 API Documentation
|
|
95
|
+
|
|
96
|
+
For detailed API documentation, please refer to the [official Pennylane API docs](https://pennylane.readme.io/reference/introduction).
|
|
97
|
+
|
|
98
|
+
## 📄 License
|
|
99
|
+
|
|
100
|
+
MIT
|