@enfuce/nextgen-sdk 0.0.1 → 0.0.3
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 +44 -0
- package/dist/authorisation-control/api.d.ts +0 -302
- package/dist/authorisation-control/api.js +10 -28
- package/dist/authorisation-control/base.d.ts +0 -24
- package/dist/authorisation-control/base.js +0 -19
- package/dist/authorisation-control/common.d.ts +4 -35
- package/dist/authorisation-control/common.js +16 -38
- package/dist/authorisation-control/configuration.d.ts +24 -17
- package/dist/authorisation-control/configuration.js +3 -3
- package/dist/card/api.d.ts +41 -740
- package/dist/card/api.js +38 -105
- package/dist/card/base.d.ts +0 -24
- package/dist/card/base.js +0 -19
- package/dist/card/common.d.ts +4 -35
- package/dist/card/common.js +16 -38
- package/dist/card/configuration.d.ts +24 -17
- package/dist/card/configuration.js +3 -3
- package/dist/cardholder/api.d.ts +959 -686
- package/dist/cardholder/api.js +783 -73
- package/dist/cardholder/base.d.ts +0 -24
- package/dist/cardholder/base.js +0 -19
- package/dist/cardholder/common.d.ts +4 -35
- package/dist/cardholder/common.js +16 -38
- package/dist/cardholder/configuration.d.ts +24 -17
- package/dist/cardholder/configuration.js +3 -3
- package/dist/cards/api.d.ts +0 -7
- package/dist/cards/api.js +2 -9
- package/dist/cards/base.d.ts +0 -24
- package/dist/cards/base.js +0 -19
- package/dist/cards/common.d.ts +4 -35
- package/dist/cards/common.js +16 -38
- package/dist/cards/configuration.d.ts +24 -17
- package/dist/cards/configuration.js +3 -3
- package/dist/clearing-file-copy/api.d.ts +0 -497
- package/dist/clearing-file-copy/api.js +12 -26
- package/dist/clearing-file-copy/base.d.ts +0 -24
- package/dist/clearing-file-copy/base.js +0 -19
- package/dist/clearing-file-copy/common.d.ts +4 -35
- package/dist/clearing-file-copy/common.js +16 -38
- package/dist/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/authorisation-control/api.d.ts +0 -302
- package/dist/esm/authorisation-control/api.js +10 -28
- package/dist/esm/authorisation-control/base.d.ts +0 -24
- package/dist/esm/authorisation-control/base.js +0 -19
- package/dist/esm/authorisation-control/common.d.ts +4 -35
- package/dist/esm/authorisation-control/common.js +14 -37
- package/dist/esm/authorisation-control/configuration.d.ts +24 -17
- package/dist/esm/authorisation-control/configuration.js +3 -3
- package/dist/esm/card/api.d.ts +41 -740
- package/dist/esm/card/api.js +38 -105
- package/dist/esm/card/base.d.ts +0 -24
- package/dist/esm/card/base.js +0 -19
- package/dist/esm/card/common.d.ts +4 -35
- package/dist/esm/card/common.js +14 -37
- package/dist/esm/card/configuration.d.ts +24 -17
- package/dist/esm/card/configuration.js +3 -3
- package/dist/esm/cardholder/api.d.ts +959 -686
- package/dist/esm/cardholder/api.js +782 -72
- package/dist/esm/cardholder/base.d.ts +0 -24
- package/dist/esm/cardholder/base.js +0 -19
- package/dist/esm/cardholder/common.d.ts +4 -35
- package/dist/esm/cardholder/common.js +14 -37
- package/dist/esm/cardholder/configuration.d.ts +24 -17
- package/dist/esm/cardholder/configuration.js +3 -3
- package/dist/esm/cards/api.d.ts +0 -7
- package/dist/esm/cards/api.js +2 -9
- package/dist/esm/cards/base.d.ts +0 -24
- package/dist/esm/cards/base.js +0 -19
- package/dist/esm/cards/common.d.ts +4 -35
- package/dist/esm/cards/common.js +14 -37
- package/dist/esm/cards/configuration.d.ts +24 -17
- package/dist/esm/cards/configuration.js +3 -3
- package/dist/esm/clearing-file-copy/api.d.ts +0 -497
- package/dist/esm/clearing-file-copy/api.js +12 -26
- package/dist/esm/clearing-file-copy/base.d.ts +0 -24
- package/dist/esm/clearing-file-copy/base.js +0 -19
- package/dist/esm/clearing-file-copy/common.d.ts +4 -35
- package/dist/esm/clearing-file-copy/common.js +14 -37
- package/dist/esm/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/esm/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/issuer-events/api.d.ts +639 -601
- package/dist/esm/issuer-events/api.js +520 -54
- package/dist/esm/issuer-events/base.d.ts +0 -24
- package/dist/esm/issuer-events/base.js +0 -19
- package/dist/esm/issuer-events/common.d.ts +4 -35
- package/dist/esm/issuer-events/common.js +14 -37
- package/dist/esm/issuer-events/configuration.d.ts +24 -17
- package/dist/esm/issuer-events/configuration.js +3 -3
- package/dist/esm/pin/api.d.ts +0 -76
- package/dist/esm/pin/api.js +3 -15
- package/dist/esm/pin/base.d.ts +0 -24
- package/dist/esm/pin/base.js +0 -19
- package/dist/esm/pin/common.d.ts +4 -35
- package/dist/esm/pin/common.js +14 -37
- package/dist/esm/pin/configuration.d.ts +24 -17
- package/dist/esm/pin/configuration.js +3 -3
- package/dist/esm/threeds/api.d.ts +0 -18
- package/dist/esm/threeds/api.js +1 -8
- package/dist/esm/threeds/base.d.ts +0 -24
- package/dist/esm/threeds/base.js +0 -19
- package/dist/esm/threeds/common.d.ts +4 -35
- package/dist/esm/threeds/common.js +14 -37
- package/dist/esm/threeds/configuration.d.ts +24 -17
- package/dist/esm/threeds/configuration.js +3 -3
- package/dist/esm/threeds-oob/api.d.ts +0 -90
- package/dist/esm/threeds-oob/api.js +2 -9
- package/dist/esm/threeds-oob/base.d.ts +0 -24
- package/dist/esm/threeds-oob/base.js +0 -19
- package/dist/esm/threeds-oob/common.d.ts +4 -35
- package/dist/esm/threeds-oob/common.js +14 -37
- package/dist/esm/threeds-oob/configuration.d.ts +24 -17
- package/dist/esm/threeds-oob/configuration.js +3 -3
- package/dist/esm/transaction-event/api.d.ts +2 -453
- package/dist/esm/transaction-event/api.js +13 -28
- package/dist/esm/transaction-event/base.d.ts +0 -24
- package/dist/esm/transaction-event/base.js +0 -19
- package/dist/esm/transaction-event/common.d.ts +4 -35
- package/dist/esm/transaction-event/common.js +14 -37
- package/dist/esm/transaction-event/configuration.d.ts +24 -17
- package/dist/esm/transaction-event/configuration.js +3 -3
- package/dist/esm/wallet/api.d.ts +0 -342
- package/dist/esm/wallet/api.js +29 -83
- package/dist/esm/wallet/base.d.ts +0 -24
- package/dist/esm/wallet/base.js +0 -19
- package/dist/esm/wallet/common.d.ts +4 -35
- package/dist/esm/wallet/common.js +14 -37
- package/dist/esm/wallet/configuration.d.ts +24 -17
- package/dist/esm/wallet/configuration.js +3 -3
- package/dist/issuer-events/api.d.ts +639 -601
- package/dist/issuer-events/api.js +521 -55
- package/dist/issuer-events/base.d.ts +0 -24
- package/dist/issuer-events/base.js +0 -19
- package/dist/issuer-events/common.d.ts +4 -35
- package/dist/issuer-events/common.js +16 -38
- package/dist/issuer-events/configuration.d.ts +24 -17
- package/dist/issuer-events/configuration.js +3 -3
- package/dist/pin/api.d.ts +0 -76
- package/dist/pin/api.js +3 -15
- package/dist/pin/base.d.ts +0 -24
- package/dist/pin/base.js +0 -19
- package/dist/pin/common.d.ts +4 -35
- package/dist/pin/common.js +16 -38
- package/dist/pin/configuration.d.ts +24 -17
- package/dist/pin/configuration.js +3 -3
- package/dist/threeds/api.d.ts +0 -18
- package/dist/threeds/api.js +1 -8
- package/dist/threeds/base.d.ts +0 -24
- package/dist/threeds/base.js +0 -19
- package/dist/threeds/common.d.ts +4 -35
- package/dist/threeds/common.js +16 -38
- package/dist/threeds/configuration.d.ts +24 -17
- package/dist/threeds/configuration.js +3 -3
- package/dist/threeds-oob/api.d.ts +0 -90
- package/dist/threeds-oob/api.js +2 -9
- package/dist/threeds-oob/base.d.ts +0 -24
- package/dist/threeds-oob/base.js +0 -19
- package/dist/threeds-oob/common.d.ts +4 -35
- package/dist/threeds-oob/common.js +16 -38
- package/dist/threeds-oob/configuration.d.ts +24 -17
- package/dist/threeds-oob/configuration.js +3 -3
- package/dist/transaction-event/api.d.ts +2 -453
- package/dist/transaction-event/api.js +13 -28
- package/dist/transaction-event/base.d.ts +0 -24
- package/dist/transaction-event/base.js +0 -19
- package/dist/transaction-event/common.d.ts +4 -35
- package/dist/transaction-event/common.js +16 -38
- package/dist/transaction-event/configuration.d.ts +24 -17
- package/dist/transaction-event/configuration.js +3 -3
- package/dist/wallet/api.d.ts +0 -342
- package/dist/wallet/api.js +29 -83
- package/dist/wallet/base.d.ts +0 -24
- package/dist/wallet/base.js +0 -19
- package/dist/wallet/common.d.ts +4 -35
- package/dist/wallet/common.js +16 -38
- package/dist/wallet/configuration.d.ts +24 -17
- package/dist/wallet/configuration.js +3 -3
- package/package.json +5 -2
- package/src/authorisation-control/api.ts +11 -314
- package/src/authorisation-control/base.ts +0 -24
- package/src/authorisation-control/common.ts +15 -38
- package/src/authorisation-control/configuration.ts +26 -20
- package/src/card/api.ts +80 -786
- package/src/card/base.ts +0 -24
- package/src/card/common.ts +15 -38
- package/src/card/configuration.ts +26 -20
- package/src/cardholder/api.ts +987 -714
- package/src/cardholder/base.ts +0 -24
- package/src/cardholder/common.ts +15 -38
- package/src/cardholder/configuration.ts +26 -20
- package/src/cards/api.ts +3 -11
- package/src/cards/base.ts +0 -24
- package/src/cards/common.ts +15 -38
- package/src/cards/configuration.ts +26 -20
- package/src/clearing-file-copy/api.ts +13 -510
- package/src/clearing-file-copy/base.ts +0 -24
- package/src/clearing-file-copy/common.ts +15 -38
- package/src/clearing-file-copy/configuration.ts +26 -20
- package/src/issuer-events/api.ts +661 -628
- package/src/issuer-events/base.ts +0 -24
- package/src/issuer-events/common.ts +15 -38
- package/src/issuer-events/configuration.ts +26 -20
- package/src/pin/api.ts +4 -83
- package/src/pin/base.ts +0 -24
- package/src/pin/common.ts +15 -38
- package/src/pin/configuration.ts +26 -20
- package/src/threeds/api.ts +2 -22
- package/src/threeds/base.ts +0 -24
- package/src/threeds/common.ts +15 -38
- package/src/threeds/configuration.ts +26 -20
- package/src/threeds-oob/api.ts +3 -95
- package/src/threeds-oob/base.ts +0 -24
- package/src/threeds-oob/common.ts +15 -38
- package/src/threeds-oob/configuration.ts +26 -20
- package/src/transaction-event/api.ts +14 -465
- package/src/transaction-event/base.ts +0 -24
- package/src/transaction-event/common.ts +15 -38
- package/src/transaction-event/configuration.ts +26 -20
- package/src/wallet/api.ts +30 -377
- package/src/wallet/base.ts +0 -24
- package/src/wallet/common.ts +15 -38
- package/src/wallet/configuration.ts +26 -20
|
@@ -21,10 +21,6 @@ import globalAxios from 'axios';
|
|
|
21
21
|
|
|
22
22
|
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
*/
|
|
28
24
|
export const COLLECTION_FORMATS = {
|
|
29
25
|
csv: ",",
|
|
30
26
|
ssv: " ",
|
|
@@ -32,21 +28,11 @@ export const COLLECTION_FORMATS = {
|
|
|
32
28
|
pipes: "|",
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @export
|
|
38
|
-
* @interface RequestArgs
|
|
39
|
-
*/
|
|
40
31
|
export interface RequestArgs {
|
|
41
32
|
url: string;
|
|
42
33
|
options: RawAxiosRequestConfig;
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class BaseAPI
|
|
49
|
-
*/
|
|
50
36
|
export class BaseAPI {
|
|
51
37
|
protected configuration: Configuration | undefined;
|
|
52
38
|
|
|
@@ -58,12 +44,6 @@ export class BaseAPI {
|
|
|
58
44
|
}
|
|
59
45
|
};
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
* @class RequiredError
|
|
65
|
-
* @extends {Error}
|
|
66
|
-
*/
|
|
67
47
|
export class RequiredError extends Error {
|
|
68
48
|
constructor(public field: string, msg?: string) {
|
|
69
49
|
super(msg);
|
|
@@ -78,9 +58,5 @@ interface ServerMap {
|
|
|
78
58
|
}[];
|
|
79
59
|
}
|
|
80
60
|
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @export
|
|
84
|
-
*/
|
|
85
61
|
export const operationServerMap: ServerMap = {
|
|
86
62
|
}
|
|
@@ -12,22 +12,16 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
import type { Configuration } from "./configuration";
|
|
17
16
|
import type { RequestArgs } from "./base";
|
|
18
17
|
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
18
|
import { RequiredError } from "./base";
|
|
20
19
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
20
|
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
21
|
|
|
27
22
|
/**
|
|
28
23
|
*
|
|
29
24
|
* @throws {RequiredError}
|
|
30
|
-
* @export
|
|
31
25
|
*/
|
|
32
26
|
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
27
|
if (paramValue === null || paramValue === undefined) {
|
|
@@ -35,10 +29,6 @@ export const assertParamExists = function (functionName: string, paramName: stri
|
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @export
|
|
41
|
-
*/
|
|
42
32
|
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
33
|
if (configuration && configuration.apiKey) {
|
|
44
34
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -48,20 +38,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
|
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
40
|
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
41
|
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
42
|
if (configuration && (configuration.username || configuration.password)) {
|
|
57
43
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
44
|
}
|
|
59
45
|
}
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
*/
|
|
65
47
|
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
48
|
if (configuration && configuration.accessToken) {
|
|
67
49
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -71,10 +53,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
|
|
|
71
53
|
}
|
|
72
54
|
}
|
|
73
55
|
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @export
|
|
77
|
-
*/
|
|
78
56
|
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
57
|
if (configuration && configuration.accessToken) {
|
|
80
58
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -84,10 +62,11 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
84
62
|
}
|
|
85
63
|
}
|
|
86
64
|
|
|
65
|
+
|
|
87
66
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
67
|
if (parameter == null) return;
|
|
89
68
|
if (typeof parameter === "object") {
|
|
90
|
-
if (Array.isArray(parameter)) {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
91
70
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
71
|
}
|
|
93
72
|
else {
|
|
@@ -106,10 +85,6 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
|
|
|
106
85
|
}
|
|
107
86
|
}
|
|
108
87
|
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @export
|
|
112
|
-
*/
|
|
113
88
|
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
89
|
const searchParams = new URLSearchParams(url.search);
|
|
115
90
|
setFlattenedQueryParams(searchParams, objects);
|
|
@@ -117,31 +92,33 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
117
92
|
}
|
|
118
93
|
|
|
119
94
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
122
98
|
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
123
108
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
109
|
const nonString = typeof value !== 'string';
|
|
125
110
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
111
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
112
|
: nonString;
|
|
128
113
|
return needsSerialization
|
|
129
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
130
115
|
: (value || "");
|
|
131
116
|
}
|
|
132
117
|
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @export
|
|
136
|
-
*/
|
|
137
118
|
export const toPathString = function (url: URL) {
|
|
138
119
|
return url.pathname + url.search + url.hash
|
|
139
120
|
}
|
|
140
121
|
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
*/
|
|
145
122
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
123
|
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
147
124
|
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
2
|
/**
|
|
4
3
|
* Issuer Events API
|
|
5
4
|
* All date-time fields adhere to the ISO 8601 standard unless specified otherwise. For example: 2024-05-31T06:55:17Z
|
|
@@ -12,12 +11,24 @@
|
|
|
12
11
|
* Do not edit the class manually.
|
|
13
12
|
*/
|
|
14
13
|
|
|
14
|
+
interface AWSv4Configuration {
|
|
15
|
+
options?: {
|
|
16
|
+
region?: string
|
|
17
|
+
service?: string
|
|
18
|
+
}
|
|
19
|
+
credentials?: {
|
|
20
|
+
accessKeyId?: string
|
|
21
|
+
secretAccessKey?: string,
|
|
22
|
+
sessionToken?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
|
|
16
26
|
export interface ConfigurationParameters {
|
|
17
27
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
28
|
username?: string;
|
|
19
29
|
password?: string;
|
|
20
30
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
21
32
|
basePath?: string;
|
|
22
33
|
serverIndex?: number;
|
|
23
34
|
baseOptions?: any;
|
|
@@ -28,49 +39,43 @@ export class Configuration {
|
|
|
28
39
|
/**
|
|
29
40
|
* parameter for apiKey security
|
|
30
41
|
* @param name security name
|
|
31
|
-
* @memberof Configuration
|
|
32
42
|
*/
|
|
33
43
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
44
|
/**
|
|
35
45
|
* parameter for basic security
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Configuration
|
|
39
46
|
*/
|
|
40
47
|
username?: string;
|
|
41
48
|
/**
|
|
42
49
|
* parameter for basic security
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof Configuration
|
|
46
50
|
*/
|
|
47
51
|
password?: string;
|
|
48
52
|
/**
|
|
49
53
|
* parameter for oauth2 security
|
|
50
54
|
* @param name security name
|
|
51
55
|
* @param scopes oauth2 scope
|
|
52
|
-
* @memberof Configuration
|
|
53
56
|
*/
|
|
54
57
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
59
66
|
* @memberof Configuration
|
|
60
67
|
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
61
72
|
basePath?: string;
|
|
62
73
|
/**
|
|
63
74
|
* override server index
|
|
64
|
-
*
|
|
65
|
-
* @type {number}
|
|
66
|
-
* @memberof Configuration
|
|
67
75
|
*/
|
|
68
76
|
serverIndex?: number;
|
|
69
77
|
/**
|
|
70
78
|
* base options for axios calls
|
|
71
|
-
*
|
|
72
|
-
* @type {any}
|
|
73
|
-
* @memberof Configuration
|
|
74
79
|
*/
|
|
75
80
|
baseOptions?: any;
|
|
76
81
|
/**
|
|
@@ -87,6 +92,7 @@ export class Configuration {
|
|
|
87
92
|
this.username = param.username;
|
|
88
93
|
this.password = param.password;
|
|
89
94
|
this.accessToken = param.accessToken;
|
|
95
|
+
this.awsv4 = param.awsv4;
|
|
90
96
|
this.basePath = param.basePath;
|
|
91
97
|
this.serverIndex = param.serverIndex;
|
|
92
98
|
this.baseOptions = {
|
|
@@ -109,7 +115,7 @@ export class Configuration {
|
|
|
109
115
|
* @return True if the given MIME is JSON, false otherwise.
|
|
110
116
|
*/
|
|
111
117
|
public isJsonMime(mime: string): boolean {
|
|
112
|
-
const jsonMime: RegExp =
|
|
113
|
-
return mime !== null &&
|
|
118
|
+
const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
119
|
+
return mime !== null && jsonMime.test(mime);
|
|
114
120
|
}
|
|
115
121
|
}
|
package/src/pin/api.ts
CHANGED
|
@@ -18,158 +18,96 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
18
18
|
import globalAxios from 'axios';
|
|
19
19
|
// Some imports not used depending on template conditions
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
|
|
22
22
|
import type { RequestArgs } from './base';
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @export
|
|
29
|
-
* @interface ChangePinRequestBody
|
|
30
|
-
*/
|
|
31
26
|
export interface ChangePinRequestBody {
|
|
32
27
|
/**
|
|
33
28
|
* The encrypted PIN block is in ISO Format 1 and is represented in hexadecimal.
|
|
34
|
-
* @type {string}
|
|
35
|
-
* @memberof ChangePinRequestBody
|
|
36
29
|
*/
|
|
37
30
|
'pinBlock': string;
|
|
38
31
|
/**
|
|
39
32
|
* Unique identifier of a resource.
|
|
40
|
-
* @type {string}
|
|
41
|
-
* @memberof ChangePinRequestBody
|
|
42
33
|
*/
|
|
43
34
|
'cardId': string;
|
|
44
35
|
/**
|
|
45
36
|
* The sequence number of the card version, this value is also known as PSN (pan sequence number)
|
|
46
|
-
* @type {number}
|
|
47
|
-
* @memberof ChangePinRequestBody
|
|
48
37
|
*/
|
|
49
38
|
'sequenceNumber'?: number;
|
|
50
39
|
/**
|
|
51
40
|
* Pre-shared ZPK key index number. If it is not specified, the first key is used by default.
|
|
52
|
-
* @type {number}
|
|
53
|
-
* @memberof ChangePinRequestBody
|
|
54
41
|
*/
|
|
55
42
|
'zpkIndex'?: number;
|
|
56
43
|
}
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @export
|
|
60
|
-
* @interface ErrorResponse
|
|
61
|
-
*/
|
|
62
44
|
export interface ErrorResponse {
|
|
63
45
|
/**
|
|
64
46
|
* The problem type.
|
|
65
|
-
* @type {string}
|
|
66
|
-
* @memberof ErrorResponse
|
|
67
47
|
*/
|
|
68
48
|
'type'?: string;
|
|
69
49
|
/**
|
|
70
50
|
* The reason phrase of HttpStatus.
|
|
71
|
-
* @type {string}
|
|
72
|
-
* @memberof ErrorResponse
|
|
73
51
|
*/
|
|
74
52
|
'title'?: string;
|
|
75
53
|
/**
|
|
76
54
|
* HTTP problem status.
|
|
77
|
-
* @type {number}
|
|
78
|
-
* @memberof ErrorResponse
|
|
79
55
|
*/
|
|
80
56
|
'status'?: number;
|
|
81
57
|
/**
|
|
82
58
|
* The problem detail.
|
|
83
|
-
* @type {string}
|
|
84
|
-
* @memberof ErrorResponse
|
|
85
59
|
*/
|
|
86
60
|
'detail'?: string;
|
|
87
61
|
/**
|
|
88
62
|
* The request path.
|
|
89
|
-
* @type {string}
|
|
90
|
-
* @memberof ErrorResponse
|
|
91
63
|
*/
|
|
92
64
|
'instance'?: string;
|
|
93
65
|
/**
|
|
94
66
|
* Unique error identifier.
|
|
95
|
-
* @type {string}
|
|
96
|
-
* @memberof ErrorResponse
|
|
97
67
|
*/
|
|
98
68
|
'id'?: string;
|
|
99
69
|
/**
|
|
100
70
|
* Date-time when error occurred.
|
|
101
|
-
* @type {string}
|
|
102
|
-
* @memberof ErrorResponse
|
|
103
71
|
*/
|
|
104
72
|
'timestamp'?: string;
|
|
105
73
|
}
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @export
|
|
109
|
-
* @interface SetPinRequestBody
|
|
110
|
-
*/
|
|
111
74
|
export interface SetPinRequestBody {
|
|
112
75
|
/**
|
|
113
76
|
* The encrypted PIN block is in ISO Format 1 and is represented in hexadecimal.
|
|
114
|
-
* @type {string}
|
|
115
|
-
* @memberof SetPinRequestBody
|
|
116
77
|
*/
|
|
117
78
|
'pinBlock': string;
|
|
118
79
|
/**
|
|
119
80
|
* Unique identifier of a resource.
|
|
120
|
-
* @type {string}
|
|
121
|
-
* @memberof SetPinRequestBody
|
|
122
81
|
*/
|
|
123
82
|
'cardId': string;
|
|
124
83
|
/**
|
|
125
84
|
* Pre-shared ZPK key index number. If it is not specified, the first key is used by default.
|
|
126
|
-
* @type {number}
|
|
127
|
-
* @memberof SetPinRequestBody
|
|
128
85
|
*/
|
|
129
86
|
'zpkIndex'?: number;
|
|
130
87
|
}
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @export
|
|
134
|
-
* @interface ViewPinRequestBody
|
|
135
|
-
*/
|
|
136
88
|
export interface ViewPinRequestBody {
|
|
137
89
|
/**
|
|
138
90
|
* Control ID that was returned in the [Request PIN Control Access Token Endpoint](https://nextgen-docs.enfuce.com/api/cards/post-card/create-pin-control-access-token).
|
|
139
|
-
* @type {string}
|
|
140
|
-
* @memberof ViewPinRequestBody
|
|
141
91
|
*/
|
|
142
92
|
'pinControlId': string;
|
|
143
93
|
/**
|
|
144
94
|
* RSA 2048 public key in PEM format (X.509 SubjectPublicKeyInfo). The key may contain: - new lines, - the PEM headers (\"-----BEGIN PUBLIC KEY-----\" and \"-----END PUBLIC KEY-----\") The key must not contain any spaces.
|
|
145
|
-
* @type {string}
|
|
146
|
-
* @memberof ViewPinRequestBody
|
|
147
95
|
*/
|
|
148
96
|
'pubKey': string;
|
|
149
97
|
}
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* @export
|
|
153
|
-
* @interface ViewPinResponseBody
|
|
154
|
-
*/
|
|
155
98
|
export interface ViewPinResponseBody {
|
|
156
99
|
/**
|
|
157
100
|
* Hex encoded value of the pin block (ISO PIN Block Format 1). It is 3DES (double length key) encrypted with the key from the tzpk field (which is provided in encrypted form).
|
|
158
|
-
* @type {string}
|
|
159
|
-
* @memberof ViewPinResponseBody
|
|
160
101
|
*/
|
|
161
102
|
'pinBlock': string;
|
|
162
103
|
/**
|
|
163
104
|
* Terminal Zone PIN Key (TZPK) that decrypts the generated PIN block to retrieve the actual PIN. Hex encoded value, encrypted with the pubKey passed as input. Once decrypted, this is the 3DES key used for decrypting the pin block.
|
|
164
|
-
* @type {string}
|
|
165
|
-
* @memberof ViewPinResponseBody
|
|
166
105
|
*/
|
|
167
106
|
'tzpk': string;
|
|
168
107
|
}
|
|
169
108
|
|
|
170
109
|
/**
|
|
171
110
|
* PINOperationsUsingPKIApi - axios parameter creator
|
|
172
|
-
* @export
|
|
173
111
|
*/
|
|
174
112
|
export const PINOperationsUsingPKIApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
175
113
|
return {
|
|
@@ -200,9 +138,8 @@ export const PINOperationsUsingPKIApiAxiosParamCreator = function (configuration
|
|
|
200
138
|
// http bearer authentication required
|
|
201
139
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
202
140
|
|
|
203
|
-
|
|
204
|
-
|
|
205
141
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
142
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
206
143
|
|
|
207
144
|
if (xAuditUser != null) {
|
|
208
145
|
localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
|
|
@@ -222,7 +159,6 @@ export const PINOperationsUsingPKIApiAxiosParamCreator = function (configuration
|
|
|
222
159
|
|
|
223
160
|
/**
|
|
224
161
|
* PINOperationsUsingPKIApi - functional programming interface
|
|
225
|
-
* @export
|
|
226
162
|
*/
|
|
227
163
|
export const PINOperationsUsingPKIApiFp = function(configuration?: Configuration) {
|
|
228
164
|
const localVarAxiosParamCreator = PINOperationsUsingPKIApiAxiosParamCreator(configuration)
|
|
@@ -246,7 +182,6 @@ export const PINOperationsUsingPKIApiFp = function(configuration?: Configuration
|
|
|
246
182
|
|
|
247
183
|
/**
|
|
248
184
|
* PINOperationsUsingPKIApi - factory interface
|
|
249
|
-
* @export
|
|
250
185
|
*/
|
|
251
186
|
export const PINOperationsUsingPKIApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
252
187
|
const localVarFp = PINOperationsUsingPKIApiFp(configuration)
|
|
@@ -267,9 +202,6 @@ export const PINOperationsUsingPKIApiFactory = function (configuration?: Configu
|
|
|
267
202
|
|
|
268
203
|
/**
|
|
269
204
|
* PINOperationsUsingPKIApi - object-oriented interface
|
|
270
|
-
* @export
|
|
271
|
-
* @class PINOperationsUsingPKIApi
|
|
272
|
-
* @extends {BaseAPI}
|
|
273
205
|
*/
|
|
274
206
|
export class PINOperationsUsingPKIApi extends BaseAPI {
|
|
275
207
|
/**
|
|
@@ -279,7 +211,6 @@ export class PINOperationsUsingPKIApi extends BaseAPI {
|
|
|
279
211
|
* @param {string} [xAuditUser] Optional audit user header
|
|
280
212
|
* @param {*} [options] Override http request option.
|
|
281
213
|
* @throws {RequiredError}
|
|
282
|
-
* @memberof PINOperationsUsingPKIApi
|
|
283
214
|
*/
|
|
284
215
|
public viewPin(viewPinRequestBody: ViewPinRequestBody, xAuditUser?: string, options?: RawAxiosRequestConfig) {
|
|
285
216
|
return PINOperationsUsingPKIApiFp(this.configuration).viewPin(viewPinRequestBody, xAuditUser, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -290,7 +221,6 @@ export class PINOperationsUsingPKIApi extends BaseAPI {
|
|
|
290
221
|
|
|
291
222
|
/**
|
|
292
223
|
* PINOperationsWithPreSharedKeyApi - axios parameter creator
|
|
293
|
-
* @export
|
|
294
224
|
*/
|
|
295
225
|
export const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
296
226
|
return {
|
|
@@ -322,9 +252,8 @@ export const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (confi
|
|
|
322
252
|
// http bearer authentication required
|
|
323
253
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
324
254
|
|
|
325
|
-
|
|
326
|
-
|
|
327
255
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
256
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
328
257
|
|
|
329
258
|
if (xIdempotencyKey != null) {
|
|
330
259
|
localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
|
|
@@ -370,9 +299,8 @@ export const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (confi
|
|
|
370
299
|
// http bearer authentication required
|
|
371
300
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
372
301
|
|
|
373
|
-
|
|
374
|
-
|
|
375
302
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
303
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
376
304
|
|
|
377
305
|
if (xIdempotencyKey != null) {
|
|
378
306
|
localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
|
|
@@ -395,7 +323,6 @@ export const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (confi
|
|
|
395
323
|
|
|
396
324
|
/**
|
|
397
325
|
* PINOperationsWithPreSharedKeyApi - functional programming interface
|
|
398
|
-
* @export
|
|
399
326
|
*/
|
|
400
327
|
export const PINOperationsWithPreSharedKeyApiFp = function(configuration?: Configuration) {
|
|
401
328
|
const localVarAxiosParamCreator = PINOperationsWithPreSharedKeyApiAxiosParamCreator(configuration)
|
|
@@ -435,7 +362,6 @@ export const PINOperationsWithPreSharedKeyApiFp = function(configuration?: Confi
|
|
|
435
362
|
|
|
436
363
|
/**
|
|
437
364
|
* PINOperationsWithPreSharedKeyApi - factory interface
|
|
438
|
-
* @export
|
|
439
365
|
*/
|
|
440
366
|
export const PINOperationsWithPreSharedKeyApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
441
367
|
const localVarFp = PINOperationsWithPreSharedKeyApiFp(configuration)
|
|
@@ -469,9 +395,6 @@ export const PINOperationsWithPreSharedKeyApiFactory = function (configuration?:
|
|
|
469
395
|
|
|
470
396
|
/**
|
|
471
397
|
* PINOperationsWithPreSharedKeyApi - object-oriented interface
|
|
472
|
-
* @export
|
|
473
|
-
* @class PINOperationsWithPreSharedKeyApi
|
|
474
|
-
* @extends {BaseAPI}
|
|
475
398
|
*/
|
|
476
399
|
export class PINOperationsWithPreSharedKeyApi extends BaseAPI {
|
|
477
400
|
/**
|
|
@@ -482,7 +405,6 @@ export class PINOperationsWithPreSharedKeyApi extends BaseAPI {
|
|
|
482
405
|
* @param {string} [xAuditUser] Optional audit user header
|
|
483
406
|
* @param {*} [options] Override http request option.
|
|
484
407
|
* @throws {RequiredError}
|
|
485
|
-
* @memberof PINOperationsWithPreSharedKeyApi
|
|
486
408
|
*/
|
|
487
409
|
public changePin(changePinRequestBody: ChangePinRequestBody, xIdempotencyKey?: string, xAuditUser?: string, options?: RawAxiosRequestConfig) {
|
|
488
410
|
return PINOperationsWithPreSharedKeyApiFp(this.configuration).changePin(changePinRequestBody, xIdempotencyKey, xAuditUser, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -496,7 +418,6 @@ export class PINOperationsWithPreSharedKeyApi extends BaseAPI {
|
|
|
496
418
|
* @param {string} [xAuditUser] Optional audit user header
|
|
497
419
|
* @param {*} [options] Override http request option.
|
|
498
420
|
* @throws {RequiredError}
|
|
499
|
-
* @memberof PINOperationsWithPreSharedKeyApi
|
|
500
421
|
*/
|
|
501
422
|
public setPin(setPinRequestBody: SetPinRequestBody, xIdempotencyKey?: string, xAuditUser?: string, options?: RawAxiosRequestConfig) {
|
|
502
423
|
return PINOperationsWithPreSharedKeyApiFp(this.configuration).setPin(setPinRequestBody, xIdempotencyKey, xAuditUser, options).then((request) => request(this.axios, this.basePath));
|
package/src/pin/base.ts
CHANGED
|
@@ -21,10 +21,6 @@ import globalAxios from 'axios';
|
|
|
21
21
|
|
|
22
22
|
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
*/
|
|
28
24
|
export const COLLECTION_FORMATS = {
|
|
29
25
|
csv: ",",
|
|
30
26
|
ssv: " ",
|
|
@@ -32,21 +28,11 @@ export const COLLECTION_FORMATS = {
|
|
|
32
28
|
pipes: "|",
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @export
|
|
38
|
-
* @interface RequestArgs
|
|
39
|
-
*/
|
|
40
31
|
export interface RequestArgs {
|
|
41
32
|
url: string;
|
|
42
33
|
options: RawAxiosRequestConfig;
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class BaseAPI
|
|
49
|
-
*/
|
|
50
36
|
export class BaseAPI {
|
|
51
37
|
protected configuration: Configuration | undefined;
|
|
52
38
|
|
|
@@ -58,12 +44,6 @@ export class BaseAPI {
|
|
|
58
44
|
}
|
|
59
45
|
};
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
* @class RequiredError
|
|
65
|
-
* @extends {Error}
|
|
66
|
-
*/
|
|
67
47
|
export class RequiredError extends Error {
|
|
68
48
|
constructor(public field: string, msg?: string) {
|
|
69
49
|
super(msg);
|
|
@@ -78,9 +58,5 @@ interface ServerMap {
|
|
|
78
58
|
}[];
|
|
79
59
|
}
|
|
80
60
|
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @export
|
|
84
|
-
*/
|
|
85
61
|
export const operationServerMap: ServerMap = {
|
|
86
62
|
}
|