@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.
- package/README.md +28 -3
- package/dist/authorisation-control/client.d.ts +47 -0
- package/dist/authorisation-control/client.js +80 -0
- package/dist/authorisation-control/index.d.ts +1 -0
- package/dist/authorisation-control/index.js +1 -0
- package/dist/card/client.d.ts +57 -0
- package/dist/card/client.js +100 -0
- package/dist/card/index.d.ts +1 -0
- package/dist/card/index.js +1 -0
- package/dist/cardholder/client.d.ts +53 -0
- package/dist/cardholder/client.js +92 -0
- package/dist/cardholder/index.d.ts +1 -0
- package/dist/cardholder/index.js +1 -0
- package/dist/cards/client.d.ts +47 -0
- package/dist/cards/client.js +80 -0
- package/dist/cards/index.d.ts +1 -0
- package/dist/cards/index.js +1 -0
- package/dist/config/enfuceUrls.d.ts +20 -0
- package/dist/config/enfuceUrls.js +47 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +22 -0
- package/dist/esm/authorisation-control/client.d.ts +47 -0
- package/dist/esm/authorisation-control/client.js +75 -0
- package/dist/esm/authorisation-control/index.d.ts +1 -0
- package/dist/esm/authorisation-control/index.js +1 -0
- package/dist/esm/card/client.d.ts +57 -0
- package/dist/esm/card/client.js +95 -0
- package/dist/esm/card/index.d.ts +1 -0
- package/dist/esm/card/index.js +1 -0
- package/dist/esm/cardholder/client.d.ts +53 -0
- package/dist/esm/cardholder/client.js +87 -0
- package/dist/esm/cardholder/index.d.ts +1 -0
- package/dist/esm/cardholder/index.js +1 -0
- package/dist/esm/cards/client.d.ts +47 -0
- package/dist/esm/cards/client.js +75 -0
- package/dist/esm/cards/index.d.ts +1 -0
- package/dist/esm/cards/index.js +1 -0
- package/dist/esm/config/enfuceUrls.d.ts +20 -0
- package/dist/esm/config/enfuceUrls.js +40 -0
- package/dist/esm/config/index.d.ts +1 -0
- package/dist/esm/config/index.js +14 -0
- package/dist/esm/exchange-rate/client.d.ts +51 -0
- package/dist/esm/exchange-rate/client.js +83 -0
- package/dist/esm/exchange-rate/index.d.ts +1 -0
- package/dist/esm/exchange-rate/index.js +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/issuer-events/client.d.ts +47 -0
- package/dist/esm/issuer-events/client.js +75 -0
- package/dist/esm/issuer-events/index.d.ts +1 -0
- package/dist/esm/issuer-events/index.js +1 -0
- package/dist/esm/pin/client.d.ts +49 -0
- package/dist/esm/pin/client.js +79 -0
- package/dist/esm/pin/index.d.ts +1 -0
- package/dist/esm/pin/index.js +1 -0
- package/dist/esm/threeds/client.d.ts +47 -0
- package/dist/esm/threeds/client.js +75 -0
- package/dist/esm/threeds/index.d.ts +1 -0
- package/dist/esm/threeds/index.js +1 -0
- package/dist/esm/threeds-oob/client.d.ts +47 -0
- package/dist/esm/threeds-oob/client.js +75 -0
- package/dist/esm/threeds-oob/index.d.ts +1 -0
- package/dist/esm/threeds-oob/index.js +1 -0
- package/dist/esm/wallet/client.d.ts +61 -0
- package/dist/esm/wallet/client.js +103 -0
- package/dist/esm/wallet/index.d.ts +1 -0
- package/dist/esm/wallet/index.js +1 -0
- package/dist/exchange-rate/client.d.ts +51 -0
- package/dist/exchange-rate/client.js +88 -0
- package/dist/exchange-rate/index.d.ts +1 -0
- package/dist/exchange-rate/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/issuer-events/client.d.ts +47 -0
- package/dist/issuer-events/client.js +80 -0
- package/dist/issuer-events/index.d.ts +1 -0
- package/dist/issuer-events/index.js +1 -0
- package/dist/pin/client.d.ts +49 -0
- package/dist/pin/client.js +84 -0
- package/dist/pin/index.d.ts +1 -0
- package/dist/pin/index.js +1 -0
- package/dist/threeds/client.d.ts +47 -0
- package/dist/threeds/client.js +80 -0
- package/dist/threeds/index.d.ts +1 -0
- package/dist/threeds/index.js +1 -0
- package/dist/threeds-oob/client.d.ts +47 -0
- package/dist/threeds-oob/client.js +80 -0
- package/dist/threeds-oob/index.d.ts +1 -0
- package/dist/threeds-oob/index.js +1 -0
- package/dist/wallet/client.d.ts +61 -0
- package/dist/wallet/client.js +108 -0
- package/dist/wallet/index.d.ts +1 -0
- package/dist/wallet/index.js +1 -0
- package/package.json +1 -1
- package/src/authorisation-control/client.ts +86 -0
- package/src/authorisation-control/index.ts +2 -0
- package/src/card/client.ts +116 -0
- package/src/card/index.ts +2 -0
- package/src/cardholder/client.ts +104 -0
- package/src/cardholder/index.ts +2 -0
- package/src/cards/client.ts +86 -0
- package/src/cards/index.ts +2 -0
- package/src/config/enfuceUrls.ts +57 -0
- package/src/config/index.ts +21 -0
- package/src/exchange-rate/client.ts +98 -0
- package/src/exchange-rate/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/issuer-events/client.ts +86 -0
- package/src/issuer-events/index.ts +2 -0
- package/src/pin/client.ts +92 -0
- package/src/pin/index.ts +2 -0
- package/src/threeds/client.ts +86 -0
- package/src/threeds/index.ts +2 -0
- package/src/threeds-oob/client.ts +86 -0
- package/src/threeds-oob/index.ts +2 -0
- package/src/wallet/client.ts +128 -0
- package/src/wallet/index.ts +2 -0
- package/test/config.test.ts +33 -0
- package/test/exchange-rate-client.test.ts +36 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IssuerEventsClientBuilder = exports.IssuerEventsClient = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Enfuce nextgen SDK — fluent module client.
|
|
6
|
+
*
|
|
7
|
+
* GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
|
|
8
|
+
* API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
|
|
9
|
+
* retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
|
|
10
|
+
*/
|
|
11
|
+
const axios_1 = require("axios");
|
|
12
|
+
const oauth_1 = require("../oauth");
|
|
13
|
+
const configuration_1 = require("./configuration");
|
|
14
|
+
const api_1 = require("./api");
|
|
15
|
+
/**
|
|
16
|
+
* Fluent entry point for this module. Build one with {@link IssuerEventsClient.builder}:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const client = IssuerEventsClient.builder()
|
|
20
|
+
* .baseUrl('https://api.example.com/...')
|
|
21
|
+
* .oauth(tokens)
|
|
22
|
+
* .build();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class IssuerEventsClient {
|
|
26
|
+
constructor(
|
|
27
|
+
/** The axios instance — OAuth interceptors and any customizations already applied. */
|
|
28
|
+
http,
|
|
29
|
+
/** The module configuration — base path applied. */
|
|
30
|
+
configuration) {
|
|
31
|
+
this.http = http;
|
|
32
|
+
this.configuration = configuration;
|
|
33
|
+
}
|
|
34
|
+
/** Build any API in this module bound to this client (for APIs without a named getter). */
|
|
35
|
+
api(factory) {
|
|
36
|
+
return factory(this.configuration, this.http);
|
|
37
|
+
}
|
|
38
|
+
/** {@link IssuerEventWebhooksApi} bound to this client. */
|
|
39
|
+
issuerEventWebhooksApi() {
|
|
40
|
+
return new api_1.IssuerEventWebhooksApi(this.configuration, undefined, this.http);
|
|
41
|
+
}
|
|
42
|
+
static builder() {
|
|
43
|
+
return new IssuerEventsClientBuilder();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.IssuerEventsClient = IssuerEventsClient;
|
|
47
|
+
/** Builds a {@link IssuerEventsClient}: base URL + optional OAuth + transport customization. */
|
|
48
|
+
class IssuerEventsClientBuilder {
|
|
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 ? (0, oauth_1.createOAuthAxios)(this._tokens) : axios_1.default.create();
|
|
73
|
+
for (const customizer of this._customizers) {
|
|
74
|
+
customizer(http);
|
|
75
|
+
}
|
|
76
|
+
const configuration = new configuration_1.Configuration({ basePath: this._baseUrl });
|
|
77
|
+
return new IssuerEventsClient(http, configuration);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.IssuerEventsClientBuilder = IssuerEventsClientBuilder;
|
|
@@ -29,3 +29,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
__exportStar(require("./api"), exports);
|
|
31
31
|
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./client"), exports);
|
|
@@ -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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PinClientBuilder = exports.PinClient = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Enfuce nextgen SDK — fluent module client.
|
|
6
|
+
*
|
|
7
|
+
* GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
|
|
8
|
+
* API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
|
|
9
|
+
* retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
|
|
10
|
+
*/
|
|
11
|
+
const axios_1 = require("axios");
|
|
12
|
+
const oauth_1 = require("../oauth");
|
|
13
|
+
const configuration_1 = require("./configuration");
|
|
14
|
+
const api_1 = require("./api");
|
|
15
|
+
/**
|
|
16
|
+
* Fluent entry point for this module. Build one with {@link PinClient.builder}:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const client = PinClient.builder()
|
|
20
|
+
* .baseUrl('https://api.example.com/...')
|
|
21
|
+
* .oauth(tokens)
|
|
22
|
+
* .build();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class PinClient {
|
|
26
|
+
constructor(
|
|
27
|
+
/** The axios instance — OAuth interceptors and any customizations already applied. */
|
|
28
|
+
http,
|
|
29
|
+
/** The module configuration — base path applied. */
|
|
30
|
+
configuration) {
|
|
31
|
+
this.http = http;
|
|
32
|
+
this.configuration = configuration;
|
|
33
|
+
}
|
|
34
|
+
/** Build any API in this module bound to this client (for APIs without a named getter). */
|
|
35
|
+
api(factory) {
|
|
36
|
+
return factory(this.configuration, this.http);
|
|
37
|
+
}
|
|
38
|
+
/** {@link PINOperationsUsingPKIApi} bound to this client. */
|
|
39
|
+
pINOperationsUsingPKIApi() {
|
|
40
|
+
return new api_1.PINOperationsUsingPKIApi(this.configuration, undefined, this.http);
|
|
41
|
+
}
|
|
42
|
+
/** {@link PINOperationsWithPreSharedKeyApi} bound to this client. */
|
|
43
|
+
pINOperationsWithPreSharedKeyApi() {
|
|
44
|
+
return new api_1.PINOperationsWithPreSharedKeyApi(this.configuration, undefined, this.http);
|
|
45
|
+
}
|
|
46
|
+
static builder() {
|
|
47
|
+
return new PinClientBuilder();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.PinClient = PinClient;
|
|
51
|
+
/** Builds a {@link PinClient}: base URL + optional OAuth + transport customization. */
|
|
52
|
+
class PinClientBuilder {
|
|
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 ? (0, oauth_1.createOAuthAxios)(this._tokens) : axios_1.default.create();
|
|
77
|
+
for (const customizer of this._customizers) {
|
|
78
|
+
customizer(http);
|
|
79
|
+
}
|
|
80
|
+
const configuration = new configuration_1.Configuration({ basePath: this._baseUrl });
|
|
81
|
+
return new PinClient(http, configuration);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.PinClientBuilder = PinClientBuilder;
|
package/dist/pin/index.d.ts
CHANGED
package/dist/pin/index.js
CHANGED
|
@@ -29,3 +29,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
__exportStar(require("./api"), exports);
|
|
31
31
|
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./client"), exports);
|
|
@@ -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,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThreedsClientBuilder = exports.ThreedsClient = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Enfuce nextgen SDK — fluent module client.
|
|
6
|
+
*
|
|
7
|
+
* GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
|
|
8
|
+
* API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
|
|
9
|
+
* retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
|
|
10
|
+
*/
|
|
11
|
+
const axios_1 = require("axios");
|
|
12
|
+
const oauth_1 = require("../oauth");
|
|
13
|
+
const configuration_1 = require("./configuration");
|
|
14
|
+
const api_1 = require("./api");
|
|
15
|
+
/**
|
|
16
|
+
* Fluent entry point for this module. Build one with {@link ThreedsClient.builder}:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const client = ThreedsClient.builder()
|
|
20
|
+
* .baseUrl('https://api.example.com/...')
|
|
21
|
+
* .oauth(tokens)
|
|
22
|
+
* .build();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class ThreedsClient {
|
|
26
|
+
constructor(
|
|
27
|
+
/** The axios instance — OAuth interceptors and any customizations already applied. */
|
|
28
|
+
http,
|
|
29
|
+
/** The module configuration — base path applied. */
|
|
30
|
+
configuration) {
|
|
31
|
+
this.http = http;
|
|
32
|
+
this.configuration = configuration;
|
|
33
|
+
}
|
|
34
|
+
/** Build any API in this module bound to this client (for APIs without a named getter). */
|
|
35
|
+
api(factory) {
|
|
36
|
+
return factory(this.configuration, this.http);
|
|
37
|
+
}
|
|
38
|
+
/** {@link ThreeDSApi} bound to this client. */
|
|
39
|
+
threeDSApi() {
|
|
40
|
+
return new api_1.ThreeDSApi(this.configuration, undefined, this.http);
|
|
41
|
+
}
|
|
42
|
+
static builder() {
|
|
43
|
+
return new ThreedsClientBuilder();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.ThreedsClient = ThreedsClient;
|
|
47
|
+
/** Builds a {@link ThreedsClient}: base URL + optional OAuth + transport customization. */
|
|
48
|
+
class ThreedsClientBuilder {
|
|
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 ? (0, oauth_1.createOAuthAxios)(this._tokens) : axios_1.default.create();
|
|
73
|
+
for (const customizer of this._customizers) {
|
|
74
|
+
customizer(http);
|
|
75
|
+
}
|
|
76
|
+
const configuration = new configuration_1.Configuration({ basePath: this._baseUrl });
|
|
77
|
+
return new ThreedsClient(http, configuration);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.ThreedsClientBuilder = ThreedsClientBuilder;
|
package/dist/threeds/index.d.ts
CHANGED
package/dist/threeds/index.js
CHANGED
|
@@ -29,3 +29,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
__exportStar(require("./api"), exports);
|
|
31
31
|
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./client"), exports);
|
|
@@ -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,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThreedsOobClientBuilder = exports.ThreedsOobClient = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Enfuce nextgen SDK — fluent module client.
|
|
6
|
+
*
|
|
7
|
+
* GENERATED by scripts/generate.sh from a custom template (generator-templates/typescript). One per
|
|
8
|
+
* API module: wires an OAuth-enabled axios instance (bearer token on every request + reactive 401
|
|
9
|
+
* retry) to the module's Configuration and exposes each API. Nothing is shared across modules.
|
|
10
|
+
*/
|
|
11
|
+
const axios_1 = require("axios");
|
|
12
|
+
const oauth_1 = require("../oauth");
|
|
13
|
+
const configuration_1 = require("./configuration");
|
|
14
|
+
const api_1 = require("./api");
|
|
15
|
+
/**
|
|
16
|
+
* Fluent entry point for this module. Build one with {@link ThreedsOobClient.builder}:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const client = ThreedsOobClient.builder()
|
|
20
|
+
* .baseUrl('https://api.example.com/...')
|
|
21
|
+
* .oauth(tokens)
|
|
22
|
+
* .build();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class ThreedsOobClient {
|
|
26
|
+
constructor(
|
|
27
|
+
/** The axios instance — OAuth interceptors and any customizations already applied. */
|
|
28
|
+
http,
|
|
29
|
+
/** The module configuration — base path applied. */
|
|
30
|
+
configuration) {
|
|
31
|
+
this.http = http;
|
|
32
|
+
this.configuration = configuration;
|
|
33
|
+
}
|
|
34
|
+
/** Build any API in this module bound to this client (for APIs without a named getter). */
|
|
35
|
+
api(factory) {
|
|
36
|
+
return factory(this.configuration, this.http);
|
|
37
|
+
}
|
|
38
|
+
/** {@link OOBAuthenticationChallengeWebhookNotificationApi} bound to this client. */
|
|
39
|
+
oOBAuthenticationChallengeWebhookNotificationApi() {
|
|
40
|
+
return new api_1.OOBAuthenticationChallengeWebhookNotificationApi(this.configuration, undefined, this.http);
|
|
41
|
+
}
|
|
42
|
+
static builder() {
|
|
43
|
+
return new ThreedsOobClientBuilder();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.ThreedsOobClient = ThreedsOobClient;
|
|
47
|
+
/** Builds a {@link ThreedsOobClient}: base URL + optional OAuth + transport customization. */
|
|
48
|
+
class ThreedsOobClientBuilder {
|
|
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 ? (0, oauth_1.createOAuthAxios)(this._tokens) : axios_1.default.create();
|
|
73
|
+
for (const customizer of this._customizers) {
|
|
74
|
+
customizer(http);
|
|
75
|
+
}
|
|
76
|
+
const configuration = new configuration_1.Configuration({ basePath: this._baseUrl });
|
|
77
|
+
return new ThreedsOobClient(http, configuration);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.ThreedsOobClientBuilder = ThreedsOobClientBuilder;
|
|
@@ -29,3 +29,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
__exportStar(require("./api"), exports);
|
|
31
31
|
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type AxiosInstance } from 'axios';
|
|
2
|
+
import { type TokenManager } from '../oauth';
|
|
3
|
+
import { Configuration } from './configuration';
|
|
4
|
+
import { ActivateTokenApi, DeactivateTokenApi, EligibleTokenRequestorsApi, GetTokensApi, PushCardsApi, PushProvisionApi, SuspendTokenApi, UnsuspendTokenApi } from './api';
|
|
5
|
+
/**
|
|
6
|
+
* Fluent entry point for this module. Build one with {@link WalletClient.builder}:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* const client = WalletClient.builder()
|
|
10
|
+
* .baseUrl('https://api.example.com/...')
|
|
11
|
+
* .oauth(tokens)
|
|
12
|
+
* .build();
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class WalletClient {
|
|
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 ActivateTokenApi} bound to this client. */
|
|
28
|
+
activateTokenApi(): ActivateTokenApi;
|
|
29
|
+
/** {@link DeactivateTokenApi} bound to this client. */
|
|
30
|
+
deactivateTokenApi(): DeactivateTokenApi;
|
|
31
|
+
/** {@link EligibleTokenRequestorsApi} bound to this client. */
|
|
32
|
+
eligibleTokenRequestorsApi(): EligibleTokenRequestorsApi;
|
|
33
|
+
/** {@link GetTokensApi} bound to this client. */
|
|
34
|
+
getTokensApi(): GetTokensApi;
|
|
35
|
+
/** {@link PushCardsApi} bound to this client. */
|
|
36
|
+
pushCardsApi(): PushCardsApi;
|
|
37
|
+
/** {@link PushProvisionApi} bound to this client. */
|
|
38
|
+
pushProvisionApi(): PushProvisionApi;
|
|
39
|
+
/** {@link SuspendTokenApi} bound to this client. */
|
|
40
|
+
suspendTokenApi(): SuspendTokenApi;
|
|
41
|
+
/** {@link UnsuspendTokenApi} bound to this client. */
|
|
42
|
+
unsuspendTokenApi(): UnsuspendTokenApi;
|
|
43
|
+
static builder(): WalletClientBuilder;
|
|
44
|
+
}
|
|
45
|
+
/** Builds a {@link WalletClient}: base URL + optional OAuth + transport customization. */
|
|
46
|
+
export declare class WalletClientBuilder {
|
|
47
|
+
private _baseUrl?;
|
|
48
|
+
private _tokens?;
|
|
49
|
+
private _customizers;
|
|
50
|
+
/** The module's host, e.g. `https://api.<tenant>.../issuer`. */
|
|
51
|
+
baseUrl(baseUrl: string): this;
|
|
52
|
+
/** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
|
|
53
|
+
oauth(tokens: TokenManager): this;
|
|
54
|
+
/**
|
|
55
|
+
* Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
|
|
56
|
+
* default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
|
|
57
|
+
* calls run in order.
|
|
58
|
+
*/
|
|
59
|
+
configure(customizer: (http: AxiosInstance) => void): this;
|
|
60
|
+
build(): WalletClient;
|
|
61
|
+
}
|