@enfuce/nextgen-sdk 0.0.5 → 0.0.7

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 (119) 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/config/enfuceUrls.d.ts +20 -0
  19. package/dist/config/enfuceUrls.js +47 -0
  20. package/dist/config/index.d.ts +1 -0
  21. package/dist/config/index.js +22 -0
  22. package/dist/esm/authorisation-control/client.d.ts +47 -0
  23. package/dist/esm/authorisation-control/client.js +75 -0
  24. package/dist/esm/authorisation-control/index.d.ts +1 -0
  25. package/dist/esm/authorisation-control/index.js +1 -0
  26. package/dist/esm/card/client.d.ts +57 -0
  27. package/dist/esm/card/client.js +95 -0
  28. package/dist/esm/card/index.d.ts +1 -0
  29. package/dist/esm/card/index.js +1 -0
  30. package/dist/esm/cardholder/client.d.ts +53 -0
  31. package/dist/esm/cardholder/client.js +87 -0
  32. package/dist/esm/cardholder/index.d.ts +1 -0
  33. package/dist/esm/cardholder/index.js +1 -0
  34. package/dist/esm/cards/client.d.ts +47 -0
  35. package/dist/esm/cards/client.js +75 -0
  36. package/dist/esm/cards/index.d.ts +1 -0
  37. package/dist/esm/cards/index.js +1 -0
  38. package/dist/esm/config/enfuceUrls.d.ts +20 -0
  39. package/dist/esm/config/enfuceUrls.js +40 -0
  40. package/dist/esm/config/index.d.ts +1 -0
  41. package/dist/esm/config/index.js +14 -0
  42. package/dist/esm/exchange-rate/client.d.ts +51 -0
  43. package/dist/esm/exchange-rate/client.js +83 -0
  44. package/dist/esm/exchange-rate/index.d.ts +1 -0
  45. package/dist/esm/exchange-rate/index.js +1 -0
  46. package/dist/esm/index.d.ts +1 -0
  47. package/dist/esm/index.js +1 -0
  48. package/dist/esm/issuer-events/client.d.ts +47 -0
  49. package/dist/esm/issuer-events/client.js +75 -0
  50. package/dist/esm/issuer-events/index.d.ts +1 -0
  51. package/dist/esm/issuer-events/index.js +1 -0
  52. package/dist/esm/pin/client.d.ts +49 -0
  53. package/dist/esm/pin/client.js +79 -0
  54. package/dist/esm/pin/index.d.ts +1 -0
  55. package/dist/esm/pin/index.js +1 -0
  56. package/dist/esm/threeds/client.d.ts +47 -0
  57. package/dist/esm/threeds/client.js +75 -0
  58. package/dist/esm/threeds/index.d.ts +1 -0
  59. package/dist/esm/threeds/index.js +1 -0
  60. package/dist/esm/threeds-oob/client.d.ts +47 -0
  61. package/dist/esm/threeds-oob/client.js +75 -0
  62. package/dist/esm/threeds-oob/index.d.ts +1 -0
  63. package/dist/esm/threeds-oob/index.js +1 -0
  64. package/dist/esm/wallet/client.d.ts +61 -0
  65. package/dist/esm/wallet/client.js +103 -0
  66. package/dist/esm/wallet/index.d.ts +1 -0
  67. package/dist/esm/wallet/index.js +1 -0
  68. package/dist/exchange-rate/client.d.ts +51 -0
  69. package/dist/exchange-rate/client.js +88 -0
  70. package/dist/exchange-rate/index.d.ts +1 -0
  71. package/dist/exchange-rate/index.js +1 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +2 -1
  74. package/dist/issuer-events/client.d.ts +47 -0
  75. package/dist/issuer-events/client.js +80 -0
  76. package/dist/issuer-events/index.d.ts +1 -0
  77. package/dist/issuer-events/index.js +1 -0
  78. package/dist/pin/client.d.ts +49 -0
  79. package/dist/pin/client.js +84 -0
  80. package/dist/pin/index.d.ts +1 -0
  81. package/dist/pin/index.js +1 -0
  82. package/dist/threeds/client.d.ts +47 -0
  83. package/dist/threeds/client.js +80 -0
  84. package/dist/threeds/index.d.ts +1 -0
  85. package/dist/threeds/index.js +1 -0
  86. package/dist/threeds-oob/client.d.ts +47 -0
  87. package/dist/threeds-oob/client.js +80 -0
  88. package/dist/threeds-oob/index.d.ts +1 -0
  89. package/dist/threeds-oob/index.js +1 -0
  90. package/dist/wallet/client.d.ts +61 -0
  91. package/dist/wallet/client.js +108 -0
  92. package/dist/wallet/index.d.ts +1 -0
  93. package/dist/wallet/index.js +1 -0
  94. package/package.json +1 -1
  95. package/src/authorisation-control/client.ts +86 -0
  96. package/src/authorisation-control/index.ts +2 -0
  97. package/src/card/client.ts +116 -0
  98. package/src/card/index.ts +2 -0
  99. package/src/cardholder/client.ts +104 -0
  100. package/src/cardholder/index.ts +2 -0
  101. package/src/cards/client.ts +86 -0
  102. package/src/cards/index.ts +2 -0
  103. package/src/config/enfuceUrls.ts +57 -0
  104. package/src/config/index.ts +21 -0
  105. package/src/exchange-rate/client.ts +98 -0
  106. package/src/exchange-rate/index.ts +2 -0
  107. package/src/index.ts +1 -0
  108. package/src/issuer-events/client.ts +86 -0
  109. package/src/issuer-events/index.ts +2 -0
  110. package/src/pin/client.ts +92 -0
  111. package/src/pin/index.ts +2 -0
  112. package/src/threeds/client.ts +86 -0
  113. package/src/threeds/index.ts +2 -0
  114. package/src/threeds-oob/client.ts +86 -0
  115. package/src/threeds-oob/index.ts +2 -0
  116. package/src/wallet/client.ts +128 -0
  117. package/src/wallet/index.ts +2 -0
  118. package/test/config.test.ts +33 -0
  119. package/test/exchange-rate-client.test.ts +36 -0
@@ -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 { CardsApi, } from './api';
12
+ /**
13
+ * Fluent entry point for this module. Build one with {@link CardsClient.builder}:
14
+ *
15
+ * ```ts
16
+ * const client = CardsClient.builder()
17
+ * .baseUrl('https://api.example.com/...')
18
+ * .oauth(tokens)
19
+ * .build();
20
+ * ```
21
+ */
22
+ export class CardsClient {
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 CardsApi} bound to this client. */
36
+ cardsApi() {
37
+ return new CardsApi(this.configuration, undefined, this.http);
38
+ }
39
+ static builder() {
40
+ return new CardsClientBuilder();
41
+ }
42
+ }
43
+ /** Builds a {@link CardsClient}: base URL + optional OAuth + transport customization. */
44
+ export class CardsClientBuilder {
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 CardsClient(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,20 @@
1
+ /**
2
+ * Identifies a single Enfuce deployment by its `tenant` and `environment` — the two variable
3
+ * segments of every Enfuce host, e.g. `api.<tenant>.<environment>.mycore.enfuce.com`.
4
+ */
5
+ export interface TenantEnvironment {
6
+ /** Tenant segment, e.g. `swile`, `shine`, `cad`. */
7
+ tenant: string;
8
+ /** Environment segment, e.g. `ext-uat1-sandbox`, `eu.live.prod`. */
9
+ environment: string;
10
+ }
11
+ /** `https://api.<tenant>.<environment>.mycore.enfuce.com` — the API root, no path. */
12
+ export declare function apiBaseUrl(te: TenantEnvironment): string;
13
+ /** `.../issuer` — issuer domain (cardholder, card, wallet, pin). */
14
+ export declare function issuerBaseUrl(te: TenantEnvironment): string;
15
+ /** `.../processor` — processor domain (transactions, 3DS). */
16
+ export declare function processorBaseUrl(te: TenantEnvironment): string;
17
+ /** `.../exchange-rates-api` — exchange-rate domain. */
18
+ export declare function exchangeRateBaseUrl(te: TenantEnvironment): string;
19
+ /** `https://auth.<tenant>.<environment>.mycore.enfuce.com/oauth2/token` — OAuth2 token endpoint. */
20
+ export declare function tokenUrl(te: TenantEnvironment): string;
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Enfuce nextgen SDK — tenant/environment addressing helper.
3
+ *
4
+ * HAND-WRITTEN, NOT GENERATED. This module (src/config) is authored by hand and
5
+ * preserved across SDK regeneration (see scripts/generate.sh). Do not expect
6
+ * OpenAPI Generator to (re)produce it.
7
+ */
8
+ const DOMAIN_SUFFIX = 'mycore.enfuce.com';
9
+ function hostSuffix(te) {
10
+ var _a, _b;
11
+ const tenant = (_a = te === null || te === void 0 ? void 0 : te.tenant) === null || _a === void 0 ? void 0 : _a.trim();
12
+ const environment = (_b = te === null || te === void 0 ? void 0 : te.environment) === null || _b === void 0 ? void 0 : _b.trim();
13
+ if (!tenant) {
14
+ throw new Error('tenant must not be empty');
15
+ }
16
+ if (!environment) {
17
+ throw new Error('environment must not be empty');
18
+ }
19
+ return `${tenant}.${environment}.${DOMAIN_SUFFIX}`;
20
+ }
21
+ /** `https://api.<tenant>.<environment>.mycore.enfuce.com` — the API root, no path. */
22
+ export function apiBaseUrl(te) {
23
+ return `https://api.${hostSuffix(te)}`;
24
+ }
25
+ /** `.../issuer` — issuer domain (cardholder, card, wallet, pin). */
26
+ export function issuerBaseUrl(te) {
27
+ return `${apiBaseUrl(te)}/issuer`;
28
+ }
29
+ /** `.../processor` — processor domain (transactions, 3DS). */
30
+ export function processorBaseUrl(te) {
31
+ return `${apiBaseUrl(te)}/processor`;
32
+ }
33
+ /** `.../exchange-rates-api` — exchange-rate domain. */
34
+ export function exchangeRateBaseUrl(te) {
35
+ return `${apiBaseUrl(te)}/exchange-rates-api`;
36
+ }
37
+ /** `https://auth.<tenant>.<environment>.mycore.enfuce.com/oauth2/token` — OAuth2 token endpoint. */
38
+ export function tokenUrl(te) {
39
+ return `https://auth.${hostSuffix(te)}/oauth2/token`;
40
+ }
@@ -0,0 +1 @@
1
+ export { TenantEnvironment, apiBaseUrl, issuerBaseUrl, processorBaseUrl, exchangeRateBaseUrl, tokenUrl, } from './enfuceUrls';
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Enfuce nextgen SDK — tenant/environment addressing helper.
3
+ *
4
+ * HAND-WRITTEN, NOT GENERATED. This module (src/config) is authored by hand and
5
+ * preserved across SDK regeneration (see scripts/generate.sh). It is re-exported
6
+ * from the package barrel as `config`:
7
+ *
8
+ * import { config, cardholder, oauth } from '@enfuce/nextgen-sdk';
9
+ *
10
+ * const te = { tenant: 'swile', environment: 'ext-uat1-sandbox' };
11
+ * const conf = new cardholder.Configuration({ basePath: config.issuerBaseUrl(te) });
12
+ * const tokens = oauth.clientCredentials({ tokenUrl: config.tokenUrl(te), clientId, clientSecret });
13
+ */
14
+ export { apiBaseUrl, issuerBaseUrl, processorBaseUrl, exchangeRateBaseUrl, tokenUrl, } from './enfuceUrls';
@@ -0,0 +1,51 @@
1
+ import { type AxiosInstance } from 'axios';
2
+ import { type TokenManager } from '../oauth';
3
+ import { Configuration } from './configuration';
4
+ import { GetECBExchangeRateApi, GetECBSupportedCurrenciesApi, GetFXExchangeRatesApi } from './api';
5
+ /**
6
+ * Fluent entry point for this module. Build one with {@link ExchangeRateClient.builder}:
7
+ *
8
+ * ```ts
9
+ * const client = ExchangeRateClient.builder()
10
+ * .baseUrl('https://api.example.com/...')
11
+ * .oauth(tokens)
12
+ * .build();
13
+ * ```
14
+ */
15
+ export declare class ExchangeRateClient {
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 GetECBExchangeRateApi} bound to this client. */
28
+ getECBExchangeRateApi(): GetECBExchangeRateApi;
29
+ /** {@link GetECBSupportedCurrenciesApi} bound to this client. */
30
+ getECBSupportedCurrenciesApi(): GetECBSupportedCurrenciesApi;
31
+ /** {@link GetFXExchangeRatesApi} bound to this client. */
32
+ getFXExchangeRatesApi(): GetFXExchangeRatesApi;
33
+ static builder(): ExchangeRateClientBuilder;
34
+ }
35
+ /** Builds a {@link ExchangeRateClient}: base URL + optional OAuth + transport customization. */
36
+ export declare class ExchangeRateClientBuilder {
37
+ private _baseUrl?;
38
+ private _tokens?;
39
+ private _customizers;
40
+ /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
41
+ baseUrl(baseUrl: string): this;
42
+ /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
43
+ oauth(tokens: TokenManager): this;
44
+ /**
45
+ * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
46
+ * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
47
+ * calls run in order.
48
+ */
49
+ configure(customizer: (http: AxiosInstance) => void): this;
50
+ build(): ExchangeRateClient;
51
+ }
@@ -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';
@@ -1,4 +1,5 @@
1
1
  export * as oauth from './oauth';
2
+ export * as config from './config';
2
3
  export * as card from './card';
3
4
  export * as wallet from './wallet';
4
5
  export * as cardholder from './cardholder';
package/dist/esm/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/generate.sh - do not edit. */
2
2
  /* One namespaced export per API. Usage: import { card } from '@enfuce/nextgen-sdk'; */
3
3
  export * as oauth from './oauth';
4
+ export * as config from './config';
4
5
  export * as card from './card';
5
6
  export * as wallet from './wallet';
6
7
  export * as cardholder from './cardholder';
@@ -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
+ }