@getpeppr/sdk 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +5 -26
  2. package/package.json +4 -1
package/README.md CHANGED
@@ -51,26 +51,6 @@ npm install @getpeppr/sdk
51
51
 
52
52
  ## Quick Examples
53
53
 
54
- ### Create draft + send later
55
-
56
- ```typescript
57
- const draft = await peppol.invoices.create({
58
- number: "INV-2026-002",
59
- to: {
60
- name: "Acme Corp",
61
- peppolId: "0208:BE9876543210",
62
- street: "123 Business Ave",
63
- city: "Brussels",
64
- postalCode: "1000",
65
- country: "BE",
66
- },
67
- lines: [{ description: "Consulting", quantity: 5, unitPrice: 200, vatRate: 21 }],
68
- });
69
-
70
- // Send when ready
71
- await peppol.invoices.sendById(draft.id);
72
- ```
73
-
74
54
  ### Credit note
75
55
 
76
56
  ```typescript
@@ -143,7 +123,7 @@ const result = await peppol.invoices.sendBatch(invoices, {
143
123
  console.log(`${result.succeeded.length} sent, ${result.failed.length} failed`);
144
124
  ```
145
125
 
146
- ### Client-side validation
126
+ ### Validation
147
127
 
148
128
  ```typescript
149
129
  const result = peppol.validate({
@@ -166,6 +146,8 @@ if (!result.valid) {
166
146
  }
167
147
  ```
168
148
 
149
+ Client-side validation runs instantly offline. It checks Peppol BIS 3.0 rules, field formats, and country-specific requirements before the invoice reaches the network.
150
+
169
151
  ### Export PDF / XML
170
152
 
171
153
  ```typescript
@@ -234,13 +216,10 @@ Transient errors (429, 500, 502, 503, 504) are automatically retried with expone
234
216
  | `invoice.refused` | Recipient refused the invoice |
235
217
  | `invoice.error` | Delivery error |
236
218
  | `invoice.registered` | Invoice registered by recipient |
237
- | `invoice.paid` | Invoice marked as paid |
238
- | `invoice.closed` | Invoice closed |
239
- | `invoice.received` | New invoice received from the network |
240
- | `creditnote.sent` | Credit note sent |
241
- | `creditnote.received` | Credit note received |
242
219
  | `test.ping` | Test event for endpoint verification |
243
220
 
221
+ Additional event types (`invoice.paid`, `invoice.closed`, `invoice.received`, `creditnote.sent`, `creditnote.received`) are defined in the SDK types for forward compatibility but are not yet emitted by the gateway.
222
+
244
223
  ## Links
245
224
 
246
225
  - [Documentation](https://getpeppr.dev/docs)
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@getpeppr/sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "Send Peppol e-invoices in under 20 lines of code",
5
8
  "type": "module",
6
9
  "main": "dist/index.js",