@theholocron/confluence-client 1.15.1 → 1.16.0

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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { RestClient } from "@theholocron/http-client";
2
+ import { ErrorSink, Logger } from "@theholocron/observability/core";
2
3
  //#region src/page/page.d.ts
3
4
  declare function page(rest: RestClient): {
4
5
  get: <T = unknown>(id: string) => Promise<T>;
@@ -13,6 +14,10 @@ interface ConfluenceClientOptions {
13
14
  token: string;
14
15
  /** Override fetch for testing. Defaults to globalThis.fetch. */
15
16
  fetch?: typeof fetch;
17
+ /** Structured logger for request/response diagnostics. Defaults to a no-op. */
18
+ logger?: Logger;
19
+ /** Reports transport failures and unexpected 5xx. Defaults to a no-op. */
20
+ errors?: ErrorSink;
16
21
  }
17
22
  declare function createConfluenceClient(opts: ConfluenceClientOptions): {
18
23
  page: {
package/dist/index.mjs CHANGED
@@ -16,7 +16,9 @@ function createConfluenceRestClient(opts) {
16
16
  baseUrl: opts.baseUrl,
17
17
  token: opts.token,
18
18
  vendor: "Confluence",
19
- fetch: opts.fetch
19
+ fetch: opts.fetch,
20
+ logger: opts.logger,
21
+ errors: opts.errors
20
22
  });
21
23
  }
22
24
  function createConfluenceClient(opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/confluence-client",
3
- "version": "1.15.1",
3
+ "version": "1.16.0",
4
4
  "description": "A TypeScript client for the Confluence API",
5
5
  "keywords": [
6
6
  "confluence",
@@ -32,7 +32,8 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@theholocron/http-client": "^1.15.1"
35
+ "@theholocron/observability": "^0.3.0",
36
+ "@theholocron/http-client": "^1.16.0"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@theholocron/eslint-config": "^8.2.0",