keycloak-api 0.0.0 → 0.2.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/.turbo/turbo-build.log +14 -24
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +21 -3
- package/dist/index.d.cts +904 -248
- package/dist/index.d.mts +904 -248
- package/dist/index.d.ts +904 -248
- package/dist/index.mjs +20 -3
- package/package.json +7 -12
- package/specs/account.yaml +677 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
at /Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:945:25
|
|
16
|
-
at runOnEndCallbacks (/Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:1316:45)
|
|
17
|
-
at buildResponseToResult (/Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:943:7)
|
|
18
|
-
at /Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:970:16
|
|
19
|
-
at responseCallbacks.<computed> (/Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:622:9)
|
|
20
|
-
at handleIncomingPacket (/Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:677:12)
|
|
21
|
-
at Socket.readFromStdout (/Users/sfera/Workspace/xata/extra/openapi-clients/node_modules/.pnpm/esbuild@0.24.1/node_modules/esbuild/lib/main.js:600:7)
|
|
22
|
-
at Socket.emit (node:events:524:28)
|
|
23
|
-
at addChunk (node:internal/streams/readable:561:12)[39m
|
|
24
|
-
[41m[30m ELIFECYCLE [39m[49m [31mCommand failed with exit code 1.[39m
|
|
1
|
+
|
|
2
|
+
> keycloak-api@0.2.0 build /home/runner/work/openapi-clients/openapi-clients/packages/keycloak-api
|
|
3
|
+
> unbuild
|
|
4
|
+
|
|
5
|
+
[info] Automatically detected entries: src/index [esm] [cjs] [dts]
|
|
6
|
+
[info] Building keycloak-api
|
|
7
|
+
[info] Cleaning dist directory: `./dist`
|
|
8
|
+
[success] Build succeeded for keycloak-api
|
|
9
|
+
[log] dist/index.cjs (total size: 3.11 kB, chunk size: 3.11 kB, exports: KeycloakAccountApi, KeycloakAdminApi)
|
|
10
|
+
|
|
11
|
+
[log] dist/index.mjs (total size: 3.05 kB, chunk size: 3.05 kB, exports: KeycloakAccountApi, KeycloakAdminApi)
|
|
12
|
+
|
|
13
|
+
Σ Total dist size (byte size): 3.34 MB
|
|
14
|
+
[log]
|
package/CHANGELOG.md
ADDED
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function notEmpty(value) {
|
|
4
|
-
return value !== null && value !==
|
|
4
|
+
return value !== null && value !== undefined;
|
|
5
5
|
}
|
|
6
6
|
function compactObject(obj) {
|
|
7
7
|
return Object.fromEntries(Object.entries(obj).filter(([, value]) => notEmpty(value)));
|
|
@@ -67,7 +67,24 @@ const resolveUrl = (url, queryParams = {}, pathParams = {}) => {
|
|
|
67
67
|
return url.replace(/\{\w*\}/g, (key) => pathParams[key.slice(1, -1)] ?? "") + query;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
class
|
|
70
|
+
class KeycloakAdminApi {
|
|
71
|
+
#baseUrl;
|
|
72
|
+
#token;
|
|
73
|
+
#fetch;
|
|
74
|
+
constructor(options) {
|
|
75
|
+
this.#baseUrl = options.baseUrl;
|
|
76
|
+
this.#token = options.token;
|
|
77
|
+
this.#fetch = options.fetch || fetch;
|
|
78
|
+
if (!this.#fetch) throw new Error("Fetch is required");
|
|
79
|
+
}
|
|
80
|
+
async request(endpoint, params) {
|
|
81
|
+
const [method = "", url = ""] = endpoint.split(" ");
|
|
82
|
+
const extraParams = params || {};
|
|
83
|
+
const result = await fetch$1({ ...extraParams, method, url, baseUrl: this.#baseUrl, token: this.#token, fetchImpl: this.#fetch });
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
class KeycloakAccountApi {
|
|
71
88
|
#baseUrl;
|
|
72
89
|
#token;
|
|
73
90
|
#fetch;
|
|
@@ -85,4 +102,5 @@ class KeycloakApi {
|
|
|
85
102
|
}
|
|
86
103
|
}
|
|
87
104
|
|
|
88
|
-
exports.
|
|
105
|
+
exports.KeycloakAccountApi = KeycloakAccountApi;
|
|
106
|
+
exports.KeycloakAdminApi = KeycloakAdminApi;
|