@enfuce/nextgen-sdk 0.0.5 → 0.0.6

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.
Files changed (103) hide show
  1. package/README.md +28 -3
  2. package/dist/authorisation-control/client.d.ts +47 -0
  3. package/dist/authorisation-control/client.js +80 -0
  4. package/dist/authorisation-control/index.d.ts +1 -0
  5. package/dist/authorisation-control/index.js +1 -0
  6. package/dist/card/client.d.ts +57 -0
  7. package/dist/card/client.js +100 -0
  8. package/dist/card/index.d.ts +1 -0
  9. package/dist/card/index.js +1 -0
  10. package/dist/cardholder/client.d.ts +53 -0
  11. package/dist/cardholder/client.js +92 -0
  12. package/dist/cardholder/index.d.ts +1 -0
  13. package/dist/cardholder/index.js +1 -0
  14. package/dist/cards/client.d.ts +47 -0
  15. package/dist/cards/client.js +80 -0
  16. package/dist/cards/index.d.ts +1 -0
  17. package/dist/cards/index.js +1 -0
  18. package/dist/esm/authorisation-control/client.d.ts +47 -0
  19. package/dist/esm/authorisation-control/client.js +75 -0
  20. package/dist/esm/authorisation-control/index.d.ts +1 -0
  21. package/dist/esm/authorisation-control/index.js +1 -0
  22. package/dist/esm/card/client.d.ts +57 -0
  23. package/dist/esm/card/client.js +95 -0
  24. package/dist/esm/card/index.d.ts +1 -0
  25. package/dist/esm/card/index.js +1 -0
  26. package/dist/esm/cardholder/client.d.ts +53 -0
  27. package/dist/esm/cardholder/client.js +87 -0
  28. package/dist/esm/cardholder/index.d.ts +1 -0
  29. package/dist/esm/cardholder/index.js +1 -0
  30. package/dist/esm/cards/client.d.ts +47 -0
  31. package/dist/esm/cards/client.js +75 -0
  32. package/dist/esm/cards/index.d.ts +1 -0
  33. package/dist/esm/cards/index.js +1 -0
  34. package/dist/esm/exchange-rate/client.d.ts +51 -0
  35. package/dist/esm/exchange-rate/client.js +83 -0
  36. package/dist/esm/exchange-rate/index.d.ts +1 -0
  37. package/dist/esm/exchange-rate/index.js +1 -0
  38. package/dist/esm/issuer-events/client.d.ts +47 -0
  39. package/dist/esm/issuer-events/client.js +75 -0
  40. package/dist/esm/issuer-events/index.d.ts +1 -0
  41. package/dist/esm/issuer-events/index.js +1 -0
  42. package/dist/esm/pin/client.d.ts +49 -0
  43. package/dist/esm/pin/client.js +79 -0
  44. package/dist/esm/pin/index.d.ts +1 -0
  45. package/dist/esm/pin/index.js +1 -0
  46. package/dist/esm/threeds/client.d.ts +47 -0
  47. package/dist/esm/threeds/client.js +75 -0
  48. package/dist/esm/threeds/index.d.ts +1 -0
  49. package/dist/esm/threeds/index.js +1 -0
  50. package/dist/esm/threeds-oob/client.d.ts +47 -0
  51. package/dist/esm/threeds-oob/client.js +75 -0
  52. package/dist/esm/threeds-oob/index.d.ts +1 -0
  53. package/dist/esm/threeds-oob/index.js +1 -0
  54. package/dist/esm/wallet/client.d.ts +61 -0
  55. package/dist/esm/wallet/client.js +103 -0
  56. package/dist/esm/wallet/index.d.ts +1 -0
  57. package/dist/esm/wallet/index.js +1 -0
  58. package/dist/exchange-rate/client.d.ts +51 -0
  59. package/dist/exchange-rate/client.js +88 -0
  60. package/dist/exchange-rate/index.d.ts +1 -0
  61. package/dist/exchange-rate/index.js +1 -0
  62. package/dist/issuer-events/client.d.ts +47 -0
  63. package/dist/issuer-events/client.js +80 -0
  64. package/dist/issuer-events/index.d.ts +1 -0
  65. package/dist/issuer-events/index.js +1 -0
  66. package/dist/pin/client.d.ts +49 -0
  67. package/dist/pin/client.js +84 -0
  68. package/dist/pin/index.d.ts +1 -0
  69. package/dist/pin/index.js +1 -0
  70. package/dist/threeds/client.d.ts +47 -0
  71. package/dist/threeds/client.js +80 -0
  72. package/dist/threeds/index.d.ts +1 -0
  73. package/dist/threeds/index.js +1 -0
  74. package/dist/threeds-oob/client.d.ts +47 -0
  75. package/dist/threeds-oob/client.js +80 -0
  76. package/dist/threeds-oob/index.d.ts +1 -0
  77. package/dist/threeds-oob/index.js +1 -0
  78. package/dist/wallet/client.d.ts +61 -0
  79. package/dist/wallet/client.js +108 -0
  80. package/dist/wallet/index.d.ts +1 -0
  81. package/dist/wallet/index.js +1 -0
  82. package/package.json +1 -1
  83. package/src/authorisation-control/client.ts +86 -0
  84. package/src/authorisation-control/index.ts +2 -0
  85. package/src/card/client.ts +116 -0
  86. package/src/card/index.ts +2 -0
  87. package/src/cardholder/client.ts +104 -0
  88. package/src/cardholder/index.ts +2 -0
  89. package/src/cards/client.ts +86 -0
  90. package/src/cards/index.ts +2 -0
  91. package/src/exchange-rate/client.ts +98 -0
  92. package/src/exchange-rate/index.ts +2 -0
  93. package/src/issuer-events/client.ts +86 -0
  94. package/src/issuer-events/index.ts +2 -0
  95. package/src/pin/client.ts +92 -0
  96. package/src/pin/index.ts +2 -0
  97. package/src/threeds/client.ts +86 -0
  98. package/src/threeds/index.ts +2 -0
  99. package/src/threeds-oob/client.ts +86 -0
  100. package/src/threeds-oob/index.ts +2 -0
  101. package/src/wallet/client.ts +128 -0
  102. package/src/wallet/index.ts +2 -0
  103. package/test/exchange-rate-client.test.ts +36 -0
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Enfuce nextgen SDK — fluent module client.
3
+ *
4
+ * GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
5
+ * API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
6
+ * retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
7
+ */
8
+ import globalAxios from 'axios';
9
+ import { createOAuthAxios } from '../oauth';
10
+ import { Configuration } from './configuration';
11
+ import { GetECBExchangeRateApi, GetECBSupportedCurrenciesApi, GetFXExchangeRatesApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link ExchangeRateClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = ExchangeRateClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class ExchangeRateClient {
23
+ constructor(
24
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
25
+ http,
26
+ /** The module configuration — base path applied. */
27
+ configuration) {
28
+ this.http = http;
29
+ this.configuration = configuration;
30
+ }
31
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
32
+ api(factory) {
33
+ return factory(this.configuration, this.http);
34
+ }
35
+ /** {@link GetECBExchangeRateApi} bound to this client. */
36
+ getECBExchangeRateApi() {
37
+ return new GetECBExchangeRateApi(this.configuration, undefined, this.http);
38
+ }
39
+ /** {@link GetECBSupportedCurrenciesApi} bound to this client. */
40
+ getECBSupportedCurrenciesApi() {
41
+ return new GetECBSupportedCurrenciesApi(this.configuration, undefined, this.http);
42
+ }
43
+ /** {@link GetFXExchangeRatesApi} bound to this client. */
44
+ getFXExchangeRatesApi() {
45
+ return new GetFXExchangeRatesApi(this.configuration, undefined, this.http);
46
+ }
47
+ static builder() {
48
+ return new ExchangeRateClientBuilder();
49
+ }
50
+ }
51
+ /** Builds a {@link ExchangeRateClient}: base URL + optional OAuth + transport customization. */
52
+ export class ExchangeRateClientBuilder {
53
+ constructor() {
54
+ this._customizers = [];
55
+ }
56
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
57
+ baseUrl(baseUrl) {
58
+ this._baseUrl = baseUrl;
59
+ return this;
60
+ }
61
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
62
+ oauth(tokens) {
63
+ this._tokens = tokens;
64
+ return this;
65
+ }
66
+ /**
67
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
68
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
69
+ * calls run in order.
70
+ */
71
+ configure(customizer) {
72
+ this._customizers.push(customizer);
73
+ return this;
74
+ }
75
+ build() {
76
+ const http = this._tokens ? createOAuthAxios(this._tokens) : globalAxios.create();
77
+ for (const customizer of this._customizers) {
78
+ customizer(http);
79
+ }
80
+ const configuration = new Configuration({ basePath: this._baseUrl });
81
+ return new ExchangeRateClient(http, configuration);
82
+ }
83
+ }
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from './client';
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from './client';
@@ -0,0 +1,47 @@
1
+ import { type AxiosInstance } from 'axios';
2
+ import { type TokenManager } from '../oauth';
3
+ import { Configuration } from './configuration';
4
+ import { IssuerEventWebhooksApi } from './api';
5
+ /**
6
+ * Fluent entry point for this module. Build one with {@link IssuerEventsClient.builder}:
7
+ *
8
+ * ```ts
9
+ * const client = IssuerEventsClient.builder()
10
+ * .baseUrl('https://api.example.com/...')
11
+ * .oauth(tokens)
12
+ * .build();
13
+ * ```
14
+ */
15
+ export declare class IssuerEventsClient {
16
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
17
+ readonly http: AxiosInstance;
18
+ /** The module configuration — base path applied. */
19
+ readonly configuration: Configuration;
20
+ constructor(
21
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
22
+ http: AxiosInstance,
23
+ /** The module configuration — base path applied. */
24
+ configuration: Configuration);
25
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
26
+ api<T>(factory: (configuration: Configuration, http: AxiosInstance) => T): T;
27
+ /** {@link IssuerEventWebhooksApi} bound to this client. */
28
+ issuerEventWebhooksApi(): IssuerEventWebhooksApi;
29
+ static builder(): IssuerEventsClientBuilder;
30
+ }
31
+ /** Builds a {@link IssuerEventsClient}: base URL + optional OAuth + transport customization. */
32
+ export declare class IssuerEventsClientBuilder {
33
+ private _baseUrl?;
34
+ private _tokens?;
35
+ private _customizers;
36
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
37
+ baseUrl(baseUrl: string): this;
38
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
39
+ oauth(tokens: TokenManager): this;
40
+ /**
41
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
42
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
43
+ * calls run in order.
44
+ */
45
+ configure(customizer: (http: AxiosInstance) => void): this;
46
+ build(): IssuerEventsClient;
47
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Enfuce nextgen SDK — fluent module client.
3
+ *
4
+ * GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
5
+ * API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
6
+ * retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
7
+ */
8
+ import globalAxios from 'axios';
9
+ import { createOAuthAxios } from '../oauth';
10
+ import { Configuration } from './configuration';
11
+ import { IssuerEventWebhooksApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link IssuerEventsClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = IssuerEventsClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class IssuerEventsClient {
23
+ constructor(
24
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
25
+ http,
26
+ /** The module configuration — base path applied. */
27
+ configuration) {
28
+ this.http = http;
29
+ this.configuration = configuration;
30
+ }
31
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
32
+ api(factory) {
33
+ return factory(this.configuration, this.http);
34
+ }
35
+ /** {@link IssuerEventWebhooksApi} bound to this client. */
36
+ issuerEventWebhooksApi() {
37
+ return new IssuerEventWebhooksApi(this.configuration, undefined, this.http);
38
+ }
39
+ static builder() {
40
+ return new IssuerEventsClientBuilder();
41
+ }
42
+ }
43
+ /** Builds a {@link IssuerEventsClient}: base URL + optional OAuth + transport customization. */
44
+ export class IssuerEventsClientBuilder {
45
+ constructor() {
46
+ this._customizers = [];
47
+ }
48
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
49
+ baseUrl(baseUrl) {
50
+ this._baseUrl = baseUrl;
51
+ return this;
52
+ }
53
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
54
+ oauth(tokens) {
55
+ this._tokens = tokens;
56
+ return this;
57
+ }
58
+ /**
59
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
60
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
61
+ * calls run in order.
62
+ */
63
+ configure(customizer) {
64
+ this._customizers.push(customizer);
65
+ return this;
66
+ }
67
+ build() {
68
+ const http = this._tokens ? createOAuthAxios(this._tokens) : globalAxios.create();
69
+ for (const customizer of this._customizers) {
70
+ customizer(http);
71
+ }
72
+ const configuration = new Configuration({ basePath: this._baseUrl });
73
+ return new IssuerEventsClient(http, configuration);
74
+ }
75
+ }
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from './client';
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from './client';
@@ -0,0 +1,49 @@
1
+ import { type AxiosInstance } from 'axios';
2
+ import { type TokenManager } from '../oauth';
3
+ import { Configuration } from './configuration';
4
+ import { PINOperationsUsingPKIApi, PINOperationsWithPreSharedKeyApi } from './api';
5
+ /**
6
+ * Fluent entry point for this module. Build one with {@link PinClient.builder}:
7
+ *
8
+ * ```ts
9
+ * const client = PinClient.builder()
10
+ * .baseUrl('https://api.example.com/...')
11
+ * .oauth(tokens)
12
+ * .build();
13
+ * ```
14
+ */
15
+ export declare class PinClient {
16
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
17
+ readonly http: AxiosInstance;
18
+ /** The module configuration — base path applied. */
19
+ readonly configuration: Configuration;
20
+ constructor(
21
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
22
+ http: AxiosInstance,
23
+ /** The module configuration — base path applied. */
24
+ configuration: Configuration);
25
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
26
+ api<T>(factory: (configuration: Configuration, http: AxiosInstance) => T): T;
27
+ /** {@link PINOperationsUsingPKIApi} bound to this client. */
28
+ pINOperationsUsingPKIApi(): PINOperationsUsingPKIApi;
29
+ /** {@link PINOperationsWithPreSharedKeyApi} bound to this client. */
30
+ pINOperationsWithPreSharedKeyApi(): PINOperationsWithPreSharedKeyApi;
31
+ static builder(): PinClientBuilder;
32
+ }
33
+ /** Builds a {@link PinClient}: base URL + optional OAuth + transport customization. */
34
+ export declare class PinClientBuilder {
35
+ private _baseUrl?;
36
+ private _tokens?;
37
+ private _customizers;
38
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
39
+ baseUrl(baseUrl: string): this;
40
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
41
+ oauth(tokens: TokenManager): this;
42
+ /**
43
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
44
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
45
+ * calls run in order.
46
+ */
47
+ configure(customizer: (http: AxiosInstance) => void): this;
48
+ build(): PinClient;
49
+ }
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Enfuce nextgen SDK — fluent module client.
3
+ *
4
+ * GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
5
+ * API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
6
+ * retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
7
+ */
8
+ import globalAxios from 'axios';
9
+ import { createOAuthAxios } from '../oauth';
10
+ import { Configuration } from './configuration';
11
+ import { PINOperationsUsingPKIApi, PINOperationsWithPreSharedKeyApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link PinClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = PinClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class PinClient {
23
+ constructor(
24
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
25
+ http,
26
+ /** The module configuration — base path applied. */
27
+ configuration) {
28
+ this.http = http;
29
+ this.configuration = configuration;
30
+ }
31
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
32
+ api(factory) {
33
+ return factory(this.configuration, this.http);
34
+ }
35
+ /** {@link PINOperationsUsingPKIApi} bound to this client. */
36
+ pINOperationsUsingPKIApi() {
37
+ return new PINOperationsUsingPKIApi(this.configuration, undefined, this.http);
38
+ }
39
+ /** {@link PINOperationsWithPreSharedKeyApi} bound to this client. */
40
+ pINOperationsWithPreSharedKeyApi() {
41
+ return new PINOperationsWithPreSharedKeyApi(this.configuration, undefined, this.http);
42
+ }
43
+ static builder() {
44
+ return new PinClientBuilder();
45
+ }
46
+ }
47
+ /** Builds a {@link PinClient}: base URL + optional OAuth + transport customization. */
48
+ export class PinClientBuilder {
49
+ constructor() {
50
+ this._customizers = [];
51
+ }
52
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
53
+ baseUrl(baseUrl) {
54
+ this._baseUrl = baseUrl;
55
+ return this;
56
+ }
57
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
58
+ oauth(tokens) {
59
+ this._tokens = tokens;
60
+ return this;
61
+ }
62
+ /**
63
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
64
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
65
+ * calls run in order.
66
+ */
67
+ configure(customizer) {
68
+ this._customizers.push(customizer);
69
+ return this;
70
+ }
71
+ build() {
72
+ const http = this._tokens ? createOAuthAxios(this._tokens) : globalAxios.create();
73
+ for (const customizer of this._customizers) {
74
+ customizer(http);
75
+ }
76
+ const configuration = new Configuration({ basePath: this._baseUrl });
77
+ return new PinClient(http, configuration);
78
+ }
79
+ }
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from './client';
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from './client';
@@ -0,0 +1,47 @@
1
+ import { type AxiosInstance } from 'axios';
2
+ import { type TokenManager } from '../oauth';
3
+ import { Configuration } from './configuration';
4
+ import { ThreeDSApi } from './api';
5
+ /**
6
+ * Fluent entry point for this module. Build one with {@link ThreedsClient.builder}:
7
+ *
8
+ * ```ts
9
+ * const client = ThreedsClient.builder()
10
+ * .baseUrl('https://api.example.com/...')
11
+ * .oauth(tokens)
12
+ * .build();
13
+ * ```
14
+ */
15
+ export declare class ThreedsClient {
16
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
17
+ readonly http: AxiosInstance;
18
+ /** The module configuration — base path applied. */
19
+ readonly configuration: Configuration;
20
+ constructor(
21
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
22
+ http: AxiosInstance,
23
+ /** The module configuration — base path applied. */
24
+ configuration: Configuration);
25
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
26
+ api<T>(factory: (configuration: Configuration, http: AxiosInstance) => T): T;
27
+ /** {@link ThreeDSApi} bound to this client. */
28
+ threeDSApi(): ThreeDSApi;
29
+ static builder(): ThreedsClientBuilder;
30
+ }
31
+ /** Builds a {@link ThreedsClient}: base URL + optional OAuth + transport customization. */
32
+ export declare class ThreedsClientBuilder {
33
+ private _baseUrl?;
34
+ private _tokens?;
35
+ private _customizers;
36
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
37
+ baseUrl(baseUrl: string): this;
38
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
39
+ oauth(tokens: TokenManager): this;
40
+ /**
41
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
42
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
43
+ * calls run in order.
44
+ */
45
+ configure(customizer: (http: AxiosInstance) => void): this;
46
+ build(): ThreedsClient;
47
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Enfuce nextgen SDK — fluent module client.
3
+ *
4
+ * GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
5
+ * API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
6
+ * retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
7
+ */
8
+ import globalAxios from 'axios';
9
+ import { createOAuthAxios } from '../oauth';
10
+ import { Configuration } from './configuration';
11
+ import { ThreeDSApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link ThreedsClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = ThreedsClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class ThreedsClient {
23
+ constructor(
24
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
25
+ http,
26
+ /** The module configuration — base path applied. */
27
+ configuration) {
28
+ this.http = http;
29
+ this.configuration = configuration;
30
+ }
31
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
32
+ api(factory) {
33
+ return factory(this.configuration, this.http);
34
+ }
35
+ /** {@link ThreeDSApi} bound to this client. */
36
+ threeDSApi() {
37
+ return new ThreeDSApi(this.configuration, undefined, this.http);
38
+ }
39
+ static builder() {
40
+ return new ThreedsClientBuilder();
41
+ }
42
+ }
43
+ /** Builds a {@link ThreedsClient}: base URL + optional OAuth + transport customization. */
44
+ export class ThreedsClientBuilder {
45
+ constructor() {
46
+ this._customizers = [];
47
+ }
48
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
49
+ baseUrl(baseUrl) {
50
+ this._baseUrl = baseUrl;
51
+ return this;
52
+ }
53
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
54
+ oauth(tokens) {
55
+ this._tokens = tokens;
56
+ return this;
57
+ }
58
+ /**
59
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
60
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
61
+ * calls run in order.
62
+ */
63
+ configure(customizer) {
64
+ this._customizers.push(customizer);
65
+ return this;
66
+ }
67
+ build() {
68
+ const http = this._tokens ? createOAuthAxios(this._tokens) : globalAxios.create();
69
+ for (const customizer of this._customizers) {
70
+ customizer(http);
71
+ }
72
+ const configuration = new Configuration({ basePath: this._baseUrl });
73
+ return new ThreedsClient(http, configuration);
74
+ }
75
+ }
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from './client';
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from './client';
@@ -0,0 +1,47 @@
1
+ import { type AxiosInstance } from 'axios';
2
+ import { type TokenManager } from '../oauth';
3
+ import { Configuration } from './configuration';
4
+ import { OOBAuthenticationChallengeWebhookNotificationApi } from './api';
5
+ /**
6
+ * Fluent entry point for this module. Build one with {@link ThreedsOobClient.builder}:
7
+ *
8
+ * ```ts
9
+ * const client = ThreedsOobClient.builder()
10
+ * .baseUrl('https://api.example.com/...')
11
+ * .oauth(tokens)
12
+ * .build();
13
+ * ```
14
+ */
15
+ export declare class ThreedsOobClient {
16
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
17
+ readonly http: AxiosInstance;
18
+ /** The module configuration — base path applied. */
19
+ readonly configuration: Configuration;
20
+ constructor(
21
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
22
+ http: AxiosInstance,
23
+ /** The module configuration — base path applied. */
24
+ configuration: Configuration);
25
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
26
+ api<T>(factory: (configuration: Configuration, http: AxiosInstance) => T): T;
27
+ /** {@link OOBAuthenticationChallengeWebhookNotificationApi} bound to this client. */
28
+ oOBAuthenticationChallengeWebhookNotificationApi(): OOBAuthenticationChallengeWebhookNotificationApi;
29
+ static builder(): ThreedsOobClientBuilder;
30
+ }
31
+ /** Builds a {@link ThreedsOobClient}: base URL + optional OAuth + transport customization. */
32
+ export declare class ThreedsOobClientBuilder {
33
+ private _baseUrl?;
34
+ private _tokens?;
35
+ private _customizers;
36
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
37
+ baseUrl(baseUrl: string): this;
38
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
39
+ oauth(tokens: TokenManager): this;
40
+ /**
41
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
42
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
43
+ * calls run in order.
44
+ */
45
+ configure(customizer: (http: AxiosInstance) => void): this;
46
+ build(): ThreedsOobClient;
47
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Enfuce nextgen SDK — fluent module client.
3
+ *
4
+ * GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
5
+ * API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
6
+ * retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
7
+ */
8
+ import globalAxios from 'axios';
9
+ import { createOAuthAxios } from '../oauth';
10
+ import { Configuration } from './configuration';
11
+ import { OOBAuthenticationChallengeWebhookNotificationApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link ThreedsOobClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = ThreedsOobClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class ThreedsOobClient {
23
+ constructor(
24
+ /** The axios instance — OAuth interceptors and any customizations already applied. */
25
+ http,
26
+ /** The module configuration — base path applied. */
27
+ configuration) {
28
+ this.http = http;
29
+ this.configuration = configuration;
30
+ }
31
+ /** Build any API in this module bound to this client (for APIs without a named getter). */
32
+ api(factory) {
33
+ return factory(this.configuration, this.http);
34
+ }
35
+ /** {@link OOBAuthenticationChallengeWebhookNotificationApi} bound to this client. */
36
+ oOBAuthenticationChallengeWebhookNotificationApi() {
37
+ return new OOBAuthenticationChallengeWebhookNotificationApi(this.configuration, undefined, this.http);
38
+ }
39
+ static builder() {
40
+ return new ThreedsOobClientBuilder();
41
+ }
42
+ }
43
+ /** Builds a {@link ThreedsOobClient}: base URL + optional OAuth + transport customization. */
44
+ export class ThreedsOobClientBuilder {
45
+ constructor() {
46
+ this._customizers = [];
47
+ }
48
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
49
+ baseUrl(baseUrl) {
50
+ this._baseUrl = baseUrl;
51
+ return this;
52
+ }
53
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
54
+ oauth(tokens) {
55
+ this._tokens = tokens;
56
+ return this;
57
+ }
58
+ /**
59
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
60
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
61
+ * calls run in order.
62
+ */
63
+ configure(customizer) {
64
+ this._customizers.push(customizer);
65
+ return this;
66
+ }
67
+ build() {
68
+ const http = this._tokens ? createOAuthAxios(this._tokens) : globalAxios.create();
69
+ for (const customizer of this._customizers) {
70
+ customizer(http);
71
+ }
72
+ const configuration = new Configuration({ basePath: this._baseUrl });
73
+ return new ThreedsOobClient(http, configuration);
74
+ }
75
+ }
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from './client';
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from './client';