@theholocron/confluence-client 1.58.0-alpha.2 → 1.58.0-alpha.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/dist/index.d.mts +3 -0
- package/dist/index.mjs +2 -0
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { RestClient } from "@theholocron/http-client";
|
|
2
2
|
import { ErrorSink, Logger } from "@theholocron/observability/core";
|
|
3
|
+
/** Reads (`get`) and updates (`update`) Confluence pages by id; the response is typed as `T`. */
|
|
3
4
|
export declare function page(rest: RestClient): {
|
|
4
5
|
get: <T = unknown>(id: string) => Promise<T>;
|
|
5
6
|
update: <T = unknown>(id: string, data: Record<string, unknown>) => Promise<T>;
|
|
6
7
|
};
|
|
8
|
+
/** Options for `createConfluenceClient`. */
|
|
7
9
|
export interface ConfluenceClientOptions {
|
|
8
10
|
/** Base URL including the API path, e.g. "https://myorg.atlassian.net/wiki/rest/api". */
|
|
9
11
|
baseUrl: string;
|
|
@@ -16,6 +18,7 @@ export interface ConfluenceClientOptions {
|
|
|
16
18
|
/** Reports transport failures and unexpected 5xx. Defaults to a no-op. */
|
|
17
19
|
errors?: ErrorSink;
|
|
18
20
|
}
|
|
21
|
+
/** Creates a Confluence API client with a `page` group, using the options' base URL and token. */
|
|
19
22
|
export declare function createConfluenceClient(opts: ConfluenceClientOptions): {
|
|
20
23
|
page: {
|
|
21
24
|
get: <T = unknown>(id: string) => Promise<T>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRestClient } from "@theholocron/http-client";
|
|
2
2
|
// src/page/page.ts
|
|
3
|
+
/** Reads (`get`) and updates (`update`) Confluence pages by id; the response is typed as `T`. */
|
|
3
4
|
function page(rest) {
|
|
4
5
|
return {
|
|
5
6
|
get: (id) => rest.request(`/${id}`),
|
|
@@ -20,6 +21,7 @@ function createConfluenceRestClient(opts) {
|
|
|
20
21
|
errors: opts.errors
|
|
21
22
|
});
|
|
22
23
|
}
|
|
24
|
+
/** Creates a Confluence API client with a `page` group, using the options' base URL and token. */
|
|
23
25
|
function createConfluenceClient(opts) {
|
|
24
26
|
return { page: page(createConfluenceRestClient(opts)) };
|
|
25
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/confluence-client",
|
|
3
|
-
"version": "1.58.0-alpha.
|
|
3
|
+
"version": "1.58.0-alpha.4",
|
|
4
4
|
"description": "A TypeScript client for the Confluence API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"confluence",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@theholocron/http-client": "^1.58.0-alpha.
|
|
35
|
+
"@theholocron/http-client": "^1.58.0-alpha.4",
|
|
36
36
|
"@theholocron/observability": "^0.6.1-alpha.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"tsdown": "^0.23.3",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vitest": "^5.0.5",
|
|
48
|
-
"@theholocron/
|
|
49
|
-
"@theholocron/
|
|
50
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.
|
|
51
|
-
"@theholocron/
|
|
48
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.5",
|
|
49
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.5",
|
|
50
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.5",
|
|
51
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.5"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22.0.0"
|