@zenglobal/api-client 1.0.0 → 1.1.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/README.md CHANGED
@@ -17,11 +17,11 @@ import {
17
17
  configureZenClient,
18
18
  loyaltyGetCard,
19
19
  pingPing,
20
- } from '@zenglobal/api-client';
20
+ } from "@zenglobal/api-client";
21
21
 
22
22
  // Configure once at startup
23
23
  configureZenClient({
24
- baseUrl: 'https://api.zenglobal.au/v1',
24
+ baseUrl: "https://api.zenglobal.au/v1",
25
25
  username: process.env.ZEN_API_USER,
26
26
  password: process.env.ZEN_API_PASS,
27
27
  });
@@ -30,7 +30,7 @@ configureZenClient({
30
30
  const { data: ping } = await pingPing();
31
31
 
32
32
  const { data: card } = await loyaltyGetCard({
33
- path: { cardNumber: '12345' },
33
+ path: { cardNumber: "12345" },
34
34
  });
35
35
  ```
36
36
 
@@ -39,14 +39,11 @@ const { data: card } = await loyaltyGetCard({
39
39
  The client normalises Zen's error pattern where HTTP 200 responses contain a non-zero `result` field. These are thrown as `ZenApiError`:
40
40
 
41
41
  ```typescript
42
- import {
43
- ZenApiError,
44
- voucherEnquireVoucher,
45
- } from '@zenglobal/api-client';
42
+ import { ZenApiError, voucherEnquireVoucher } from "@zenglobal/api-client";
46
43
 
47
44
  try {
48
45
  const { data } = await voucherEnquireVoucher({
49
- body: { voucher: { voucherNumber: '999' } },
46
+ body: { voucher: { voucherNumber: "999" } },
50
47
  });
51
48
  } catch (error) {
52
49
  if (error instanceof ZenApiError) {
@@ -58,13 +55,13 @@ try {
58
55
 
59
56
  ## Configuration Options
60
57
 
61
- | Option | Type | Default | Description |
62
- | ---------- | -------- | --------------- | ------------------------ |
63
- | `baseUrl` | `string` | — | Zen API base URL |
64
- | `username` | `string` | — | HTTP Basic Auth username |
65
- | `password` | `string` | — | HTTP Basic Auth password |
66
- | `timeout` | `number` | `30000` | Request timeout in ms |
67
- | `retry` | `object` | `{ limit: 3 }` | Retry configuration |
58
+ | Option | Type | Default | Description |
59
+ | ---------- | -------- | -------------- | ------------------------ |
60
+ | `baseUrl` | `string` | — | Zen API base URL |
61
+ | `username` | `string` | — | HTTP Basic Auth username |
62
+ | `password` | `string` | — | HTTP Basic Auth password |
63
+ | `timeout` | `number` | `30000` | Request timeout in ms |
64
+ | `retry` | `object` | `{ limit: 3 }` | Retry configuration |
68
65
 
69
66
  ## Advanced Usage
70
67
 
@@ -73,11 +70,11 @@ try {
73
70
  For advanced scenarios, access the underlying client directly:
74
71
 
75
72
  ```typescript
76
- import { client } from '@zenglobal/api-client';
73
+ import { client } from "@zenglobal/api-client";
77
74
 
78
75
  // Add custom interceptors
79
76
  client.interceptors.request.use((request, options) => {
80
- request.headers.set('X-Request-ID', crypto.randomUUID());
77
+ request.headers.set("X-Request-ID", crypto.randomUUID());
81
78
  return request;
82
79
  });
83
80
  ```
@@ -1,3 +1,4 @@
1
+ import type { Client } from './client/client/index.js';
1
2
  export interface ZenClientConfig {
2
3
  /** Base URL of the Zen API, e.g. 'https://api.zenglobal.au/v1' */
3
4
  baseUrl: string;
@@ -18,13 +19,21 @@ export interface ZenClientConfig {
18
19
  */
19
20
  export declare function resetConfigureState(): void;
20
21
  /**
21
- * Configure the Zen API client with authentication and error handling.
22
+ * Configure the global Zen API client singleton with authentication and error handling.
22
23
  * Call this once at application startup before making any API calls.
23
- *
24
- * The error interceptor normalises Zen's pattern where HTTP 200 responses
25
- * may contain a non-zero `result` field indicating a business-logic error.
26
- * These are thrown as ZenApiError instances so consumers always get errors
27
- * as exceptions rather than having to inspect response bodies.
28
24
  */
29
25
  export declare function configureZenClient(config: ZenClientConfig): void;
26
+ /**
27
+ * Create a new, independent Zen API client instance.
28
+ *
29
+ * Use this when you need multiple clients with different credentials,
30
+ * e.g. connecting to several banners simultaneously. Pass the returned
31
+ * client via the `client` option on any SDK function:
32
+ *
33
+ * ```ts
34
+ * const bmClient = createZenClient({ baseUrl: '...', username: '...', password: '...' });
35
+ * const { data } = await pingPing({ client: bmClient });
36
+ * ```
37
+ */
38
+ export declare function createZenClient(config: ZenClientConfig): Client;
30
39
  //# sourceMappingURL=configure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../src/configure.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5B;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAsDhE"}
1
+ {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../src/configure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5B;AAmDD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAkBhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAmB/D"}
package/dist/configure.js CHANGED
@@ -1,6 +1,53 @@
1
1
  import { client } from './client/client.gen.js';
2
+ import { createClient, createConfig } from './client/client/index.js';
2
3
  import { ZenApiError } from './errors.js';
3
4
  let interceptorRegistered = false;
5
+ /**
6
+ * Register the Zen error interceptor on a client instance.
7
+ *
8
+ * Normalises Zen's pattern where HTTP 200 responses may contain a non-zero
9
+ * `result` field indicating a business-logic error. These are thrown as
10
+ * ZenApiError instances so consumers always get errors as exceptions rather
11
+ * than having to inspect response bodies.
12
+ */
13
+ function registerErrorInterceptor(target) {
14
+ target.interceptors.response.use((response, _request, _options) => {
15
+ if (!response.ok)
16
+ return response;
17
+ const contentType = response.headers.get('content-type');
18
+ if (!contentType?.includes('application/json'))
19
+ return response;
20
+ // Clone and inspect the body for Zen's 200-with-error pattern.
21
+ // We read the cloned body so downstream parsing on the original still works.
22
+ return response
23
+ .clone()
24
+ .json()
25
+ .then((body) => {
26
+ if (body !== null &&
27
+ typeof body === 'object' &&
28
+ 'result' in body &&
29
+ typeof body.result === 'number' &&
30
+ body.result !== 0) {
31
+ const b = body;
32
+ throw new ZenApiError({
33
+ code: b.result,
34
+ errorMessage: b.errormessage ?? 'Unknown error',
35
+ issue: b.issue,
36
+ reason: b.reason,
37
+ response,
38
+ });
39
+ }
40
+ return response;
41
+ })
42
+ .catch((err) => {
43
+ if (err instanceof ZenApiError)
44
+ throw err;
45
+ if (err instanceof SyntaxError)
46
+ return response;
47
+ throw err;
48
+ });
49
+ });
50
+ }
4
51
  /**
5
52
  * Reset module-level interceptor registration state.
6
53
  * For use in tests only — not exported from the public index.ts barrel.
@@ -10,13 +57,8 @@ export function resetConfigureState() {
10
57
  interceptorRegistered = false;
11
58
  }
12
59
  /**
13
- * Configure the Zen API client with authentication and error handling.
60
+ * Configure the global Zen API client singleton with authentication and error handling.
14
61
  * Call this once at application startup before making any API calls.
15
- *
16
- * The error interceptor normalises Zen's pattern where HTTP 200 responses
17
- * may contain a non-zero `result` field indicating a business-logic error.
18
- * These are thrown as ZenApiError instances so consumers always get errors
19
- * as exceptions rather than having to inspect response bodies.
20
62
  */
21
63
  export function configureZenClient(config) {
22
64
  const credentials = Buffer.from(`${config.username}:${config.password}`).toString('base64');
@@ -30,42 +72,33 @@ export function configureZenClient(config) {
30
72
  });
31
73
  if (!interceptorRegistered) {
32
74
  interceptorRegistered = true;
33
- client.interceptors.response.use((response, _request, _options) => {
34
- if (!response.ok)
35
- return response;
36
- const contentType = response.headers.get('content-type');
37
- if (!contentType?.includes('application/json'))
38
- return response;
39
- // Clone and inspect the body for Zen's 200-with-error pattern.
40
- // We read the cloned body so downstream parsing on the original still works.
41
- return response
42
- .clone()
43
- .json()
44
- .then((body) => {
45
- if (body !== null &&
46
- typeof body === 'object' &&
47
- 'result' in body &&
48
- typeof body.result === 'number' &&
49
- body.result !== 0) {
50
- const b = body;
51
- throw new ZenApiError({
52
- code: b.result,
53
- errorMessage: b.errormessage ?? 'Unknown error',
54
- issue: b.issue,
55
- reason: b.reason,
56
- response,
57
- });
58
- }
59
- return response;
60
- })
61
- .catch((err) => {
62
- if (err instanceof ZenApiError)
63
- throw err;
64
- if (err instanceof SyntaxError)
65
- return response;
66
- throw err;
67
- });
68
- });
75
+ registerErrorInterceptor(client);
69
76
  }
70
77
  }
78
+ /**
79
+ * Create a new, independent Zen API client instance.
80
+ *
81
+ * Use this when you need multiple clients with different credentials,
82
+ * e.g. connecting to several banners simultaneously. Pass the returned
83
+ * client via the `client` option on any SDK function:
84
+ *
85
+ * ```ts
86
+ * const bmClient = createZenClient({ baseUrl: '...', username: '...', password: '...' });
87
+ * const { data } = await pingPing({ client: bmClient });
88
+ * ```
89
+ */
90
+ export function createZenClient(config) {
91
+ const instance = createClient(createConfig());
92
+ const credentials = Buffer.from(`${config.username}:${config.password}`).toString('base64');
93
+ instance.setConfig({
94
+ baseUrl: config.baseUrl,
95
+ timeout: config.timeout ?? 30_000,
96
+ retry: { limit: config.retry?.limit ?? 3 },
97
+ headers: {
98
+ Authorization: `Basic ${credentials}`,
99
+ },
100
+ });
101
+ registerErrorInterceptor(instance);
102
+ return instance;
103
+ }
71
104
  //# sourceMappingURL=configure.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configure.js","sourceRoot":"","sources":["../src/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAe1C,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACrC,qBAAqB,GAAG,KAAK,CAAC;AAChC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAuB;IACxD,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAC7B,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,CACxC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAErB,MAAM,CAAC,SAAS,CAAC;QACf,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,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,qBAAqB,GAAG,IAAI,CAAC;QAE7B,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;YAChE,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAAE,OAAO,QAA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AO,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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { configureZenClient } from './configure.js';
1
+ export { configureZenClient, createZenClient } from './configure.js';
2
2
  export type { ZenClientConfig } from './configure.js';
3
3
  export { ZenApiError } from './errors.js';
4
4
  export { client } from './client/client.gen.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,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,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Client configuration
2
- export { configureZenClient } from './configure.js';
2
+ export { configureZenClient, createZenClient } from './configure.js';
3
3
  // Error handling
4
4
  export { ZenApiError } from './errors.js';
5
5
  // Generated client instance
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,MAAM,gBAAgB,CAAC;AAGpD,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,4BAA4B;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,kCAAkC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,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,MAAM,aAAa,CAAC;AAE1C,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": "1.0.0",
3
+ "version": "1.1.4",
4
4
  "description": "TypeScript client for the Zen API v1, generated from the OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "type": "module",