@theholocron/axiom-client 1.58.0-alpha.64 → 1.58.0-alpha.66
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 +1 -0
- package/dist/index.mjs +16 -9
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -103,6 +103,7 @@ export declare function createAxiomClient(opts: AxiomClientOptions): {
|
|
|
103
103
|
};
|
|
104
104
|
tokens: {
|
|
105
105
|
create: (input: CreateAxiomTokenInput) => Promise<AxiomCreatedToken>;
|
|
106
|
+
delete: (id: string) => Promise<void>;
|
|
106
107
|
};
|
|
107
108
|
user: {
|
|
108
109
|
me: () => Promise<AxiomUser>;
|
package/dist/index.mjs
CHANGED
|
@@ -30,15 +30,22 @@ function datasets(rest) {
|
|
|
30
30
|
}
|
|
31
31
|
// src/tokens/tokens.ts
|
|
32
32
|
function tokens(rest) {
|
|
33
|
-
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
create: (input) => rest.request("/v2/tokens", {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
return {
|
|
34
|
+
/**
|
|
35
|
+
* Make an API token (`POST /v2/tokens`). The caller needs a personal access token and the organization id
|
|
36
|
+
* (`orgId` on the client), and can grant only capabilities it holds itself. The secret `token` is in the answer once.
|
|
37
|
+
*/
|
|
38
|
+
create: (input) => rest.request("/v2/tokens", {
|
|
39
|
+
method: "POST",
|
|
40
|
+
body: input
|
|
41
|
+
}),
|
|
42
|
+
/**
|
|
43
|
+
* Delete an API token (`DELETE /v2/tokens/{id}`, answers 204). The id goes in the path through
|
|
44
|
+
* `encodeURIComponent`. Axiom answers 404 for an id it does not have or one that has expired, which this throws as a
|
|
45
|
+
* `ProviderApiError` for the caller to read.
|
|
46
|
+
*/
|
|
47
|
+
delete: (id) => rest.request(`/v2/tokens/${encodeURIComponent(id)}`, { method: "DELETE" })
|
|
48
|
+
};
|
|
42
49
|
}
|
|
43
50
|
// src/user/user.ts
|
|
44
51
|
function user(rest) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/axiom-client",
|
|
3
|
-
"version": "1.58.0-alpha.
|
|
3
|
+
"version": "1.58.0-alpha.66",
|
|
4
4
|
"description": "A TypeScript client for the Axiom API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"axiom",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@theholocron/http-client": "^1.58.0-alpha.
|
|
36
|
-
"@theholocron/observability": "^0.7.0-alpha.
|
|
35
|
+
"@theholocron/http-client": "^1.58.0-alpha.66",
|
|
36
|
+
"@theholocron/observability": "^0.7.0-alpha.9"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^26",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"tsdown": "^0.23.7",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "^5.1.1",
|
|
48
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.24",
|
|
48
49
|
"@theholocron/tsconfig": "^8.9.0-alpha.24",
|
|
49
50
|
"@theholocron/tsdown-config": "^8.9.0-alpha.24",
|
|
50
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.24",
|
|
51
51
|
"@theholocron/vitest-config": "^8.9.0-alpha.24"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|