@zenglobal/api-client 2.0.0 → 3.0.1
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/README.md +35 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/sdk.gen.d.ts +4 -2
- package/dist/client/sdk.gen.d.ts.map +1 -1
- package/dist/client/sdk.gen.js +4 -2
- package/dist/client/sdk.gen.js.map +1 -1
- package/dist/client/types.gen.d.ts +96 -271
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/configure.d.ts +1 -1
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +24 -11
- package/dist/configure.js.map +1 -1
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +25 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/configure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { client } from
|
|
2
|
-
import { createClient, createConfig } from
|
|
3
|
-
import { ZenApiError } from
|
|
1
|
+
import { client } from "./client/client.gen.js";
|
|
2
|
+
import { createClient, createConfig } from "./client/client/index.js";
|
|
3
|
+
import { ZenApiError, ZenHttpError } from "./errors.js";
|
|
4
4
|
let interceptorRegistered = false;
|
|
5
5
|
/**
|
|
6
6
|
* Register the Zen error interceptor on a client instance.
|
|
@@ -11,11 +11,23 @@ let interceptorRegistered = false;
|
|
|
11
11
|
* than having to inspect response bodies.
|
|
12
12
|
*/
|
|
13
13
|
function registerErrorInterceptor(target) {
|
|
14
|
+
target.interceptors.error.use((error, response, request, _options) => {
|
|
15
|
+
if (error instanceof Error)
|
|
16
|
+
return error;
|
|
17
|
+
return new ZenHttpError({
|
|
18
|
+
status: response.status,
|
|
19
|
+
statusText: response.statusText,
|
|
20
|
+
body: error,
|
|
21
|
+
url: request.url,
|
|
22
|
+
method: request.method,
|
|
23
|
+
response,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
14
26
|
target.interceptors.response.use((response, _request, _options) => {
|
|
15
27
|
if (!response.ok)
|
|
16
28
|
return response;
|
|
17
|
-
const contentType = response.headers.get(
|
|
18
|
-
if (!contentType?.includes(
|
|
29
|
+
const contentType = response.headers.get("content-type");
|
|
30
|
+
if (!contentType?.includes("application/json"))
|
|
19
31
|
return response;
|
|
20
32
|
// Clone and inspect the body for Zen's 200-with-error pattern.
|
|
21
33
|
// We read the cloned body so downstream parsing on the original still works.
|
|
@@ -24,14 +36,14 @@ function registerErrorInterceptor(target) {
|
|
|
24
36
|
.json()
|
|
25
37
|
.then((body) => {
|
|
26
38
|
if (body !== null &&
|
|
27
|
-
typeof body ===
|
|
28
|
-
|
|
29
|
-
typeof body.result ===
|
|
39
|
+
typeof body === "object" &&
|
|
40
|
+
"result" in body &&
|
|
41
|
+
typeof body.result === "number" &&
|
|
30
42
|
body.result !== 0) {
|
|
31
43
|
const b = body;
|
|
32
44
|
throw new ZenApiError({
|
|
33
45
|
code: b.result,
|
|
34
|
-
errorMessage: b.errormessage ??
|
|
46
|
+
errorMessage: b.errormessage ?? "Unknown error",
|
|
35
47
|
issue: b.issue,
|
|
36
48
|
reason: b.reason,
|
|
37
49
|
response,
|
|
@@ -54,6 +66,7 @@ function registerErrorInterceptor(target) {
|
|
|
54
66
|
*/
|
|
55
67
|
export function resetConfigureState() {
|
|
56
68
|
client.interceptors.response.clear();
|
|
69
|
+
client.interceptors.error.clear();
|
|
57
70
|
interceptorRegistered = false;
|
|
58
71
|
}
|
|
59
72
|
/**
|
|
@@ -61,7 +74,7 @@ export function resetConfigureState() {
|
|
|
61
74
|
* Call this once at application startup before making any API calls.
|
|
62
75
|
*/
|
|
63
76
|
export function configureZenClient(config) {
|
|
64
|
-
const credentials = Buffer.from(`${config.username}:${config.password}`).toString(
|
|
77
|
+
const credentials = Buffer.from(`${config.username}:${config.password}`).toString("base64");
|
|
65
78
|
client.setConfig({
|
|
66
79
|
baseUrl: config.baseUrl,
|
|
67
80
|
timeout: config.timeout ?? 30_000,
|
|
@@ -89,7 +102,7 @@ export function configureZenClient(config) {
|
|
|
89
102
|
*/
|
|
90
103
|
export function createZenClient(config) {
|
|
91
104
|
const instance = createClient(createConfig());
|
|
92
|
-
const credentials = Buffer.from(`${config.username}:${config.password}`).toString(
|
|
105
|
+
const credentials = Buffer.from(`${config.username}:${config.password}`).toString("base64");
|
|
93
106
|
instance.setConfig({
|
|
94
107
|
baseUrl: config.baseUrl,
|
|
95
108
|
timeout: config.timeout ?? 30_000,
|
package/dist/configure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../src/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../src/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAexD,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC;;;;;;;GAOG;AACH,SAAS,wBAAwB,CAAC,MAAc;IAC9C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;QACnE,IAAI,KAAK,YAAY,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzC,OAAO,IAAI,YAAY,CAAC;YACtB,MAAM,E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CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAErB,QAAQ,CAAC,SAAS,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM;QACjC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,EAAE;QAC1C,OAAO,EAAE;YACP,aAAa,EAAE,SAAS,WAAW,EAAE;SACtC;KACF,CAAC,CAAC;IAEH,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAEnC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -6,6 +6,28 @@
|
|
|
6
6
|
* Key codes: 0=OK, 1=InvalidAccessKey, 4=NotFound, 8=MissingData,
|
|
7
7
|
* 9=RequestRejected, 500=DatabaseNotAvailable.
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Thrown when the Zen API returns an HTTP error (4xx/5xx).
|
|
11
|
+
*
|
|
12
|
+
* Provides structured access to the HTTP status, response body, and
|
|
13
|
+
* request details so errors are diagnosable downstream.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ZenHttpError extends Error {
|
|
16
|
+
readonly status: number;
|
|
17
|
+
readonly statusText: string;
|
|
18
|
+
readonly body: unknown;
|
|
19
|
+
readonly url: string;
|
|
20
|
+
readonly method: string;
|
|
21
|
+
readonly response: Response;
|
|
22
|
+
constructor(opts: {
|
|
23
|
+
status: number;
|
|
24
|
+
statusText: string;
|
|
25
|
+
body: unknown;
|
|
26
|
+
url: string;
|
|
27
|
+
method: string;
|
|
28
|
+
response: Response;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
9
31
|
export declare class ZenApiError extends Error {
|
|
10
32
|
readonly code: number;
|
|
11
33
|
readonly errorMessage: string;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":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AAM,CAAC,EAAE,MAAM,CAAC;IAChC,SAAgB,QAAQ,EAAE,QAAQ,CAAC;gBAEvB,IAAI,EAAE;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,QAAQ,CAAC;KACpB;CASF"}
|
package/dist/errors.js
CHANGED
|
@@ -6,6 +6,30 @@
|
|
|
6
6
|
* Key codes: 0=OK, 1=InvalidAccessKey, 4=NotFound, 8=MissingData,
|
|
7
7
|
* 9=RequestRejected, 500=DatabaseNotAvailable.
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Thrown when the Zen API returns an HTTP error (4xx/5xx).
|
|
11
|
+
*
|
|
12
|
+
* Provides structured access to the HTTP status, response body, and
|
|
13
|
+
* request details so errors are diagnosable downstream.
|
|
14
|
+
*/
|
|
15
|
+
export class ZenHttpError extends Error {
|
|
16
|
+
status;
|
|
17
|
+
statusText;
|
|
18
|
+
body;
|
|
19
|
+
url;
|
|
20
|
+
method;
|
|
21
|
+
response;
|
|
22
|
+
constructor(opts) {
|
|
23
|
+
super(`HTTP ${opts.status} ${opts.method} ${opts.url}: ${opts.statusText}`);
|
|
24
|
+
this.name = "ZenHttpError";
|
|
25
|
+
this.status = opts.status;
|
|
26
|
+
this.statusText = opts.statusText;
|
|
27
|
+
this.body = opts.body;
|
|
28
|
+
this.url = opts.url;
|
|
29
|
+
this.method = opts.method;
|
|
30
|
+
this.response = opts.response;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
9
33
|
export class ZenApiError extends Error {
|
|
10
34
|
code;
|
|
11
35
|
errorMessage;
|
|
@@ -14,7 +38,7 @@ export class ZenApiError extends Error {
|
|
|
14
38
|
response;
|
|
15
39
|
constructor(opts) {
|
|
16
40
|
super(`Zen API error ${opts.code}: ${opts.errorMessage}`);
|
|
17
|
-
this.name =
|
|
41
|
+
this.name = "ZenApiError";
|
|
18
42
|
this.code = opts.code;
|
|
19
43
|
this.errorMessage = opts.errorMessage;
|
|
20
44
|
this.issue = opts.issue;
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpB,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,KAAK,CAAU;IACf,MAAM,CAAU;IAChB,QAAQ,CAAW;IAEnC,YAAY,IAMX;QACC,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH;;;;;GAKG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrB,MAAM,CAAS;IACf,UAAU,CAAS;IACnB,IAAI,CAAU;IACd,GAAG,CAAS;IACZ,MAAM,CAAS;IACf,QAAQ,CAAW;IAEnC,YAAY,IAOX;QACC,KAAK,CAAC,QAAQ,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpB,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,KAAK,CAAU;IACf,MAAM,CAAU;IAChB,QAAQ,CAAW;IAEnC,YAAY,IAMX;QACC,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { configureZenClient, createZenClient } from
|
|
2
|
-
export type { ZenClientConfig } from
|
|
3
|
-
export { ZenApiError } from
|
|
4
|
-
export { client } from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export { configureZenClient, createZenClient } from "./configure.js";
|
|
2
|
+
export type { ZenClientConfig } from "./configure.js";
|
|
3
|
+
export { ZenApiError, ZenHttpError } from "./errors.js";
|
|
4
|
+
export { client } from "./client/client.gen.js";
|
|
5
|
+
export * from "./client/sdk.gen.js";
|
|
6
|
+
export * from "./client/types.gen.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Client configuration
|
|
2
|
-
export { configureZenClient, createZenClient } from
|
|
2
|
+
export { configureZenClient, createZenClient } from "./configure.js";
|
|
3
3
|
// Error handling
|
|
4
|
-
export { ZenApiError } from
|
|
4
|
+
export { ZenApiError, ZenHttpError } from "./errors.js";
|
|
5
5
|
// Generated client instance
|
|
6
|
-
export { client } from
|
|
6
|
+
export { client } from "./client/client.gen.js";
|
|
7
7
|
// Generated SDK methods and types
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
8
|
+
export * from "./client/sdk.gen.js";
|
|
9
|
+
export * from "./client/types.gen.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGrE,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGrE,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,4BAA4B;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,kCAAkC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenglobal/api-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "TypeScript client for the Zen API v1, generated from the OpenAPI specification",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -50,5 +50,6 @@
|
|
|
50
50
|
"tsx": "^4.21.0",
|
|
51
51
|
"typescript": "^5.7.0",
|
|
52
52
|
"vitest": "^4.0.18"
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"zenCompatibility": "114.0.1"
|
|
54
55
|
}
|