@billkit-eu/sdk 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -8,7 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  Versioning is independent of the Python SDK; the two ship on their own cadence,
9
9
  so the numbers will diverge after this first release.
10
10
 
11
- ## [Unreleased]
11
+ ## [0.2.1]
12
+
13
+ ### Changed
14
+ - Documentation only. API keys are now `bk_live_…` / `bk_test_…` and webhook
15
+ signing secrets `bkwhsec_…`; every example here used the previous
16
+ Stripe-shaped `sk_`/`whsec_` spelling. No code in this package changed: it
17
+ never parsed the prefix, it forwards the key as a bearer token.
18
+
19
+ ## [0.2.0]
12
20
 
13
21
  ### Added
14
22
  - `client.prices.update(id, { active: false })` archives a price
@@ -71,7 +79,7 @@ First public release.
71
79
  - **Opt-in logging.** Pass a `logger` to see the request/retry lifecycle:
72
80
 
73
81
  ```ts
74
- const client = new BillKit({ apiKey: "sk_test_...", logger: console });
82
+ const client = new BillKit({ apiKey: "bk_test_...", logger: console });
75
83
  ```
76
84
 
77
85
  Omitted (the default) the SDK is silent: it ships no logger, no transport
package/README.md CHANGED
@@ -193,7 +193,7 @@ for await (const row of client.auditLogs.iter({ actor_id: "act_1" })) {
193
193
  import { BillKit } from "@billkit-eu/sdk";
194
194
 
195
195
  const client = new BillKit({
196
- apiKey: "sk_test_...", // or set BILLKIT_API_KEY
196
+ apiKey: "bk_test_...", // or set BILLKIT_API_KEY
197
197
  baseUrl: "https://api.billkit.eu", // override for self-hosted
198
198
  timeoutMs: 30_000,
199
199
  retryPolicy: {
@@ -259,7 +259,7 @@ The status is the field the API cannot get wrong. Requests that never reach a ro
259
259
  The SDK is **silent by default**. It ships no logger, no transport and no destination, so it can't take over your application's output because it never picks one. Hand it a logger to opt in:
260
260
 
261
261
  ```ts
262
- const client = new BillKit({ apiKey: "sk_test_...", logger: console });
262
+ const client = new BillKit({ apiKey: "bk_test_...", logger: console });
263
263
  ```
264
264
 
265
265
  ```
@@ -285,7 +285,7 @@ If your logger takes context first, wrap it:
285
285
 
286
286
  ```ts
287
287
  const client = new BillKit({
288
- apiKey: "sk_test_...",
288
+ apiKey: "bk_test_...",
289
289
  logger: {
290
290
  debug: (m, c) => pino.debug(c, m),
291
291
  warn: (m, c) => pino.warn(c, m),
package/dist/index.cjs CHANGED
@@ -365,7 +365,7 @@ var WebhookEndpoints = class extends BaseResource {
365
365
  delete(id, params = {}) {
366
366
  return this.del(`/v1/webhook_endpoints/${id}`, params);
367
367
  }
368
- /** Rotate the signing secret. The new `whsec_...` is returned once. */
368
+ /** Rotate the signing secret. The new `bkwhsec_...` is returned once. */
369
369
  rotateSecret(id, params = {}) {
370
370
  return this.postEmpty(`/v1/webhook_endpoints/${id}/rotate_secret`, params);
371
371
  }
@@ -733,7 +733,7 @@ function sleep(ms) {
733
733
  }
734
734
 
735
735
  // src/version.ts
736
- var VERSION = "0.2.0";
736
+ var VERSION = "0.2.1";
737
737
 
738
738
  // src/transport.ts
739
739
  var DEFAULT_BASE_URL = "https://api.billkit.eu";