@caracalai/admin 0.1.0 → 0.1.2
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/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +3 -4
- package/dist/errors.js.map +1 -1
- package/package.json +21 -7
package/dist/errors.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { CaracalError } from '@caracalai/core';
|
|
2
|
+
export declare class AdminApiError extends CaracalError {
|
|
2
3
|
readonly status: number;
|
|
3
|
-
readonly code: string;
|
|
4
4
|
readonly body: unknown;
|
|
5
5
|
constructor(status: number, code: string, body: unknown, message?: string);
|
|
6
6
|
}
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,qBAAa,aAAc,SAAQ,YAAY;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;gBAEV,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM;CAM1E"}
|
package/dist/errors.js
CHANGED
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
// Caracal, a product of Garudex Labs
|
|
3
3
|
//
|
|
4
4
|
// Error type raised for non-2xx admin API responses.
|
|
5
|
-
|
|
5
|
+
import { CaracalError } from '@caracalai/core';
|
|
6
|
+
export class AdminApiError extends CaracalError {
|
|
6
7
|
status;
|
|
7
|
-
code;
|
|
8
8
|
body;
|
|
9
9
|
constructor(status, code, body, message) {
|
|
10
|
-
super(message ?? `${code} (HTTP ${status})
|
|
10
|
+
super(code, message ?? `${code} (HTTP ${status})`, { details: { status, body } });
|
|
11
11
|
this.name = 'AdminApiError';
|
|
12
12
|
this.status = status;
|
|
13
|
-
this.code = code;
|
|
14
13
|
this.body = body;
|
|
15
14
|
}
|
|
16
15
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,EAAE;AACF,qDAAqD;AAErD,MAAM,OAAO,aAAc,SAAQ,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,EAAE;AACF,qDAAqD;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,MAAM,OAAO,aAAc,SAAQ,YAAY;IACpC,MAAM,CAAQ;IACd,IAAI,CAAS;IAEtB,YAAY,MAAc,EAAE,IAAY,EAAE,IAAa,EAAE,OAAgB;QACvE,KAAK,CAAC,IAAI,EAAE,OAAO,IAAI,GAAG,IAAI,UAAU,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QACjF,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caracalai/admin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Typed Caracal admin API client.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/Garudex-Labs/caracal",
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
"url": "https://github.com/Garudex-Labs/caracal.git",
|
|
10
10
|
"directory": "packages/admin/ts"
|
|
11
11
|
},
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"caracal",
|
|
14
|
+
"admin",
|
|
15
|
+
"api",
|
|
16
|
+
"client"
|
|
17
|
+
],
|
|
13
18
|
"type": "module",
|
|
14
19
|
"main": "./dist/index.js",
|
|
15
20
|
"types": "./dist/index.d.ts",
|
|
@@ -19,17 +24,26 @@
|
|
|
19
24
|
"types": "./dist/index.d.ts"
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
|
-
"files": [
|
|
23
|
-
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
24
35
|
"scripts": {
|
|
25
36
|
"build": "tsc",
|
|
26
37
|
"typecheck": "tsc --noEmit",
|
|
27
38
|
"test": "vitest run --root ../../.. tests/typescript/unit/admin",
|
|
28
39
|
"prepublishOnly": "tsc"
|
|
29
40
|
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@caracalai/core": "0.1.2"
|
|
43
|
+
},
|
|
30
44
|
"devDependencies": {
|
|
31
|
-
"@types/node": "^24.
|
|
32
|
-
"typescript": "^
|
|
33
|
-
"vitest": "^
|
|
45
|
+
"@types/node": "^24.12.2",
|
|
46
|
+
"typescript": "^6.0.3",
|
|
47
|
+
"vitest": "^4.1.6"
|
|
34
48
|
}
|
|
35
49
|
}
|