@enfuce/nextgen-sdk 0.0.7 → 0.0.9

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 (107) hide show
  1. package/README.md +209 -27
  2. package/dist/authorisation-control/api.d.ts +0 -56
  3. package/dist/authorisation-control/api.js +1 -115
  4. package/dist/authorisation-control/index.d.ts +0 -1
  5. package/dist/authorisation-control/index.js +0 -1
  6. package/dist/card/api.js +12 -12
  7. package/dist/card/client.d.ts +2 -2
  8. package/dist/cardholder/api.js +5 -5
  9. package/dist/cardholder/client.d.ts +2 -2
  10. package/dist/cards/client.d.ts +2 -2
  11. package/dist/esm/authorisation-control/api.d.ts +0 -56
  12. package/dist/esm/authorisation-control/api.js +0 -110
  13. package/dist/esm/authorisation-control/index.d.ts +0 -1
  14. package/dist/esm/authorisation-control/index.js +0 -1
  15. package/dist/esm/card/api.js +12 -12
  16. package/dist/esm/card/client.d.ts +2 -2
  17. package/dist/esm/cardholder/api.js +5 -5
  18. package/dist/esm/cardholder/client.d.ts +2 -2
  19. package/dist/esm/cards/client.d.ts +2 -2
  20. package/dist/esm/exchange-rate/client.d.ts +2 -2
  21. package/dist/esm/issuer-events/api.d.ts +0 -120
  22. package/dist/esm/issuer-events/api.js +0 -241
  23. package/dist/esm/issuer-events/index.d.ts +0 -1
  24. package/dist/esm/issuer-events/index.js +0 -1
  25. package/dist/esm/oauth/axios.d.ts +3 -3
  26. package/dist/esm/oauth/axios.js +1 -1
  27. package/dist/esm/oauth/clientCredentials.d.ts +31 -3
  28. package/dist/esm/oauth/clientCredentials.js +59 -4
  29. package/dist/esm/oauth/index.d.ts +2 -2
  30. package/dist/esm/oauth/index.js +2 -2
  31. package/dist/esm/oauth/tokenManager.d.ts +2 -2
  32. package/dist/esm/oauth/tokenManager.js +2 -2
  33. package/dist/esm/pin/api.d.ts +52 -0
  34. package/dist/esm/pin/api.js +80 -3
  35. package/dist/esm/pin/client.d.ts +2 -2
  36. package/dist/esm/threeds/client.d.ts +2 -2
  37. package/dist/esm/threeds-oob/api.d.ts +0 -56
  38. package/dist/esm/threeds-oob/api.js +0 -112
  39. package/dist/esm/threeds-oob/index.d.ts +0 -1
  40. package/dist/esm/threeds-oob/index.js +0 -1
  41. package/dist/esm/wallet/api.js +12 -12
  42. package/dist/esm/wallet/client.d.ts +2 -2
  43. package/dist/exchange-rate/client.d.ts +2 -2
  44. package/dist/issuer-events/api.d.ts +0 -120
  45. package/dist/issuer-events/api.js +1 -246
  46. package/dist/issuer-events/index.d.ts +0 -1
  47. package/dist/issuer-events/index.js +0 -1
  48. package/dist/oauth/axios.d.ts +3 -3
  49. package/dist/oauth/axios.js +1 -1
  50. package/dist/oauth/clientCredentials.d.ts +31 -3
  51. package/dist/oauth/clientCredentials.js +60 -3
  52. package/dist/oauth/index.d.ts +2 -2
  53. package/dist/oauth/index.js +4 -2
  54. package/dist/oauth/tokenManager.d.ts +2 -2
  55. package/dist/oauth/tokenManager.js +4 -4
  56. package/dist/pin/api.d.ts +52 -0
  57. package/dist/pin/api.js +80 -3
  58. package/dist/pin/client.d.ts +2 -2
  59. package/dist/threeds/client.d.ts +2 -2
  60. package/dist/threeds-oob/api.d.ts +0 -56
  61. package/dist/threeds-oob/api.js +1 -117
  62. package/dist/threeds-oob/index.d.ts +0 -1
  63. package/dist/threeds-oob/index.js +0 -1
  64. package/dist/wallet/api.js +12 -12
  65. package/dist/wallet/client.d.ts +2 -2
  66. package/package.json +1 -1
  67. package/src/authorisation-control/api.ts +0 -102
  68. package/src/authorisation-control/index.ts +0 -2
  69. package/src/card/api.ts +12 -12
  70. package/src/card/client.ts +3 -3
  71. package/src/cardholder/api.ts +5 -5
  72. package/src/cardholder/client.ts +3 -3
  73. package/src/cards/client.ts +3 -3
  74. package/src/exchange-rate/client.ts +3 -3
  75. package/src/issuer-events/api.ts +0 -237
  76. package/src/issuer-events/index.ts +0 -2
  77. package/src/oauth/axios.ts +3 -3
  78. package/src/oauth/clientCredentials.ts +87 -4
  79. package/src/oauth/index.ts +9 -2
  80. package/src/oauth/tokenManager.ts +2 -2
  81. package/src/pin/api.ts +99 -3
  82. package/src/pin/client.ts +3 -3
  83. package/src/threeds/client.ts +3 -3
  84. package/src/threeds-oob/api.ts +0 -105
  85. package/src/threeds-oob/index.ts +0 -2
  86. package/src/wallet/api.ts +12 -12
  87. package/src/wallet/client.ts +3 -3
  88. package/test/clientCredentials.test.ts +20 -0
  89. package/test/oauth.test.ts +12 -12
  90. package/dist/authorisation-control/client.d.ts +0 -47
  91. package/dist/authorisation-control/client.js +0 -80
  92. package/dist/esm/authorisation-control/client.d.ts +0 -47
  93. package/dist/esm/authorisation-control/client.js +0 -75
  94. package/dist/esm/issuer-events/client.d.ts +0 -47
  95. package/dist/esm/issuer-events/client.js +0 -75
  96. package/dist/esm/threeds-oob/client.d.ts +0 -47
  97. package/dist/esm/threeds-oob/client.js +0 -75
  98. package/dist/issuer-events/client.d.ts +0 -47
  99. package/dist/issuer-events/client.js +0 -80
  100. package/dist/threeds-oob/client.d.ts +0 -47
  101. package/dist/threeds-oob/client.js +0 -80
  102. package/src/authorisation-control/client.ts +0 -86
  103. package/src/issuer-events/client.ts +0 -86
  104. package/src/threeds-oob/client.ts +0 -86
  105. package/test/authorisation-control.test.ts +0 -71
  106. package/test/issuer-events.test.ts +0 -55
  107. package/test/threeds-oob.test.ts +0 -90
package/dist/pin/api.js CHANGED
@@ -34,6 +34,44 @@ const base_1 = require("./base");
34
34
  */
35
35
  const PINOperationsUsingPKIApiAxiosParamCreator = function (configuration) {
36
36
  return {
37
+ /**
38
+ * Send a request to this endpoint to generate a temporary Terminal Zone PIN Key (TZPK) for Set PIN or Change PIN flows. The TZPK is encrypted with the provided ephemeral RSA 2048 bit public key and returned as a base64 encoded value.
39
+ * @summary Generate Set/Change PIN TZPK
40
+ * @param {SetPinTzpkRequestBody} setPinTzpkRequestBody Request payload for generating a temporary PIN encryption key.
41
+ * @param {string} [xAuditUser] Optional audit user header
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ setPinTzpk: (setPinTzpkRequestBody_1, xAuditUser_1, ...args_1) => __awaiter(this, [setPinTzpkRequestBody_1, xAuditUser_1, ...args_1], void 0, function* (setPinTzpkRequestBody, xAuditUser, options = {}) {
46
+ // verify required parameter 'setPinTzpkRequestBody' is not null or undefined
47
+ (0, common_1.assertParamExists)('setPinTzpk', 'setPinTzpkRequestBody', setPinTzpkRequestBody);
48
+ const localVarPath = `/v1/pin/pki/set/tzpk`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
56
+ const localVarHeaderParameter = {};
57
+ const localVarQueryParameter = {};
58
+ // authentication bearerAuth required
59
+ // http bearer authentication required
60
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
61
+ localVarHeaderParameter['Content-Type'] = 'application/json';
62
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
63
+ if (xAuditUser != null) {
64
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
65
+ }
66
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
67
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
68
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
69
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(setPinTzpkRequestBody, localVarRequestOptions, configuration);
70
+ return {
71
+ url: (0, common_1.toPathString)(localVarUrlObj),
72
+ options: localVarRequestOptions,
73
+ };
74
+ }),
37
75
  /**
38
76
  * Send a request to this endpoint to retrieve the card PIN (ISO PIN Block Format 1) encrypted with temporary PIN encryption key (tzpk). The tzpk is encrypted with the provided ephemeral RSA 2048 bit public key. Steps for retrieving the ISO PIN Block Format 1: - Decrypt the tzpk with the RSA private key. Now you have the decrypted 3DES double length key. - Decrypt the PIN block with the decrypted tzpk using 3DES decryption.
39
77
  * @summary Retrieve Encrypted PIN
@@ -59,7 +97,7 @@ const PINOperationsUsingPKIApiAxiosParamCreator = function (configuration) {
59
97
  // http bearer authentication required
60
98
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
61
99
  localVarHeaderParameter['Content-Type'] = 'application/json';
62
- localVarHeaderParameter['Accept'] = 'application/json';
100
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
63
101
  if (xAuditUser != null) {
64
102
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
65
103
  }
@@ -81,6 +119,23 @@ exports.PINOperationsUsingPKIApiAxiosParamCreator = PINOperationsUsingPKIApiAxio
81
119
  const PINOperationsUsingPKIApiFp = function (configuration) {
82
120
  const localVarAxiosParamCreator = (0, exports.PINOperationsUsingPKIApiAxiosParamCreator)(configuration);
83
121
  return {
122
+ /**
123
+ * Send a request to this endpoint to generate a temporary Terminal Zone PIN Key (TZPK) for Set PIN or Change PIN flows. The TZPK is encrypted with the provided ephemeral RSA 2048 bit public key and returned as a base64 encoded value.
124
+ * @summary Generate Set/Change PIN TZPK
125
+ * @param {SetPinTzpkRequestBody} setPinTzpkRequestBody Request payload for generating a temporary PIN encryption key.
126
+ * @param {string} [xAuditUser] Optional audit user header
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ setPinTzpk(setPinTzpkRequestBody, xAuditUser, options) {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ var _a, _b, _c;
133
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setPinTzpk(setPinTzpkRequestBody, xAuditUser, options);
134
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
135
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PINOperationsUsingPKIApi.setPinTzpk']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
136
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
137
+ });
138
+ },
84
139
  /**
85
140
  * Send a request to this endpoint to retrieve the card PIN (ISO PIN Block Format 1) encrypted with temporary PIN encryption key (tzpk). The tzpk is encrypted with the provided ephemeral RSA 2048 bit public key. Steps for retrieving the ISO PIN Block Format 1: - Decrypt the tzpk with the RSA private key. Now you have the decrypted 3DES double length key. - Decrypt the PIN block with the decrypted tzpk using 3DES decryption.
86
141
  * @summary Retrieve Encrypted PIN
@@ -107,6 +162,17 @@ exports.PINOperationsUsingPKIApiFp = PINOperationsUsingPKIApiFp;
107
162
  const PINOperationsUsingPKIApiFactory = function (configuration, basePath, axios) {
108
163
  const localVarFp = (0, exports.PINOperationsUsingPKIApiFp)(configuration);
109
164
  return {
165
+ /**
166
+ * Send a request to this endpoint to generate a temporary Terminal Zone PIN Key (TZPK) for Set PIN or Change PIN flows. The TZPK is encrypted with the provided ephemeral RSA 2048 bit public key and returned as a base64 encoded value.
167
+ * @summary Generate Set/Change PIN TZPK
168
+ * @param {SetPinTzpkRequestBody} setPinTzpkRequestBody Request payload for generating a temporary PIN encryption key.
169
+ * @param {string} [xAuditUser] Optional audit user header
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
173
+ setPinTzpk(setPinTzpkRequestBody, xAuditUser, options) {
174
+ return localVarFp.setPinTzpk(setPinTzpkRequestBody, xAuditUser, options).then((request) => request(axios, basePath));
175
+ },
110
176
  /**
111
177
  * Send a request to this endpoint to retrieve the card PIN (ISO PIN Block Format 1) encrypted with temporary PIN encryption key (tzpk). The tzpk is encrypted with the provided ephemeral RSA 2048 bit public key. Steps for retrieving the ISO PIN Block Format 1: - Decrypt the tzpk with the RSA private key. Now you have the decrypted 3DES double length key. - Decrypt the PIN block with the decrypted tzpk using 3DES decryption.
112
178
  * @summary Retrieve Encrypted PIN
@@ -125,6 +191,17 @@ exports.PINOperationsUsingPKIApiFactory = PINOperationsUsingPKIApiFactory;
125
191
  * PINOperationsUsingPKIApi - object-oriented interface
126
192
  */
127
193
  class PINOperationsUsingPKIApi extends base_1.BaseAPI {
194
+ /**
195
+ * Send a request to this endpoint to generate a temporary Terminal Zone PIN Key (TZPK) for Set PIN or Change PIN flows. The TZPK is encrypted with the provided ephemeral RSA 2048 bit public key and returned as a base64 encoded value.
196
+ * @summary Generate Set/Change PIN TZPK
197
+ * @param {SetPinTzpkRequestBody} setPinTzpkRequestBody Request payload for generating a temporary PIN encryption key.
198
+ * @param {string} [xAuditUser] Optional audit user header
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ */
202
+ setPinTzpk(setPinTzpkRequestBody, xAuditUser, options) {
203
+ return (0, exports.PINOperationsUsingPKIApiFp)(this.configuration).setPinTzpk(setPinTzpkRequestBody, xAuditUser, options).then((request) => request(this.axios, this.basePath));
204
+ }
128
205
  /**
129
206
  * Send a request to this endpoint to retrieve the card PIN (ISO PIN Block Format 1) encrypted with temporary PIN encryption key (tzpk). The tzpk is encrypted with the provided ephemeral RSA 2048 bit public key. Steps for retrieving the ISO PIN Block Format 1: - Decrypt the tzpk with the RSA private key. Now you have the decrypted 3DES double length key. - Decrypt the PIN block with the decrypted tzpk using 3DES decryption.
130
207
  * @summary Retrieve Encrypted PIN
@@ -169,7 +246,7 @@ const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (configuratio
169
246
  // http bearer authentication required
170
247
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
171
248
  localVarHeaderParameter['Content-Type'] = 'application/json';
172
- localVarHeaderParameter['Accept'] = 'application/json';
249
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
173
250
  if (xIdempotencyKey != null) {
174
251
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
175
252
  }
@@ -211,7 +288,7 @@ const PINOperationsWithPreSharedKeyApiAxiosParamCreator = function (configuratio
211
288
  // http bearer authentication required
212
289
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
213
290
  localVarHeaderParameter['Content-Type'] = 'application/json';
214
- localVarHeaderParameter['Accept'] = 'application/json';
291
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
215
292
  if (xIdempotencyKey != null) {
216
293
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
217
294
  }
@@ -1,5 +1,5 @@
1
1
  import { type AxiosInstance } from 'axios';
2
- import { type TokenManager } from '../oauth';
2
+ import { type OAuthClientCredentialsManager } from '../oauth';
3
3
  import { Configuration } from './configuration';
4
4
  import { PINOperationsUsingPKIApi, PINOperationsWithPreSharedKeyApi } from './api';
5
5
  /**
@@ -38,7 +38,7 @@ export declare class PinClientBuilder {
38
38
  /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
39
39
  baseUrl(baseUrl: string): this;
40
40
  /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
41
- oauth(tokens: TokenManager): this;
41
+ oauth(tokens: OAuthClientCredentialsManager): this;
42
42
  /**
43
43
  * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
44
44
  * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
@@ -1,5 +1,5 @@
1
1
  import { type AxiosInstance } from 'axios';
2
- import { type TokenManager } from '../oauth';
2
+ import { type OAuthClientCredentialsManager } from '../oauth';
3
3
  import { Configuration } from './configuration';
4
4
  import { ThreeDSApi } from './api';
5
5
  /**
@@ -36,7 +36,7 @@ export declare class ThreedsClientBuilder {
36
36
  /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
37
37
  baseUrl(baseUrl: string): this;
38
38
  /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
39
- oauth(tokens: TokenManager): this;
39
+ oauth(tokens: OAuthClientCredentialsManager): this;
40
40
  /**
41
41
  * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
42
42
  * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
@@ -9,10 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- import type { RequestArgs } from './base';
15
- import { BaseAPI } from './base';
16
12
  export interface InitiateAuthenticationChallengeBody {
17
13
  /**
18
14
  * Unique identifier of the authentication request.
@@ -97,55 +93,3 @@ export declare const ThreeDsTransactionDeviceChannelEnum: {
97
93
  readonly RequestorInitiated: "REQUESTOR_INITIATED";
98
94
  };
99
95
  export type ThreeDsTransactionDeviceChannelEnum = typeof ThreeDsTransactionDeviceChannelEnum[keyof typeof ThreeDsTransactionDeviceChannelEnum];
100
- /**
101
- * OOBAuthenticationChallengeWebhookNotificationApi - axios parameter creator
102
- */
103
- export declare const OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator: (configuration?: Configuration) => {
104
- /**
105
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
106
- * @summary Initiate OOB Authentication Challenge
107
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
108
- * @param {*} [options] Override http request option.
109
- * @throws {RequiredError}
110
- */
111
- initiateAuthenticationChallenge: (initiateAuthenticationChallengeBody: InitiateAuthenticationChallengeBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
112
- };
113
- /**
114
- * OOBAuthenticationChallengeWebhookNotificationApi - functional programming interface
115
- */
116
- export declare const OOBAuthenticationChallengeWebhookNotificationApiFp: (configuration?: Configuration) => {
117
- /**
118
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
119
- * @summary Initiate OOB Authentication Challenge
120
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
121
- * @param {*} [options] Override http request option.
122
- * @throws {RequiredError}
123
- */
124
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody: InitiateAuthenticationChallengeBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
125
- };
126
- /**
127
- * OOBAuthenticationChallengeWebhookNotificationApi - factory interface
128
- */
129
- export declare const OOBAuthenticationChallengeWebhookNotificationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
130
- /**
131
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
132
- * @summary Initiate OOB Authentication Challenge
133
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- */
137
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody: InitiateAuthenticationChallengeBody, options?: RawAxiosRequestConfig): AxiosPromise<void>;
138
- };
139
- /**
140
- * OOBAuthenticationChallengeWebhookNotificationApi - object-oriented interface
141
- */
142
- export declare class OOBAuthenticationChallengeWebhookNotificationApi extends BaseAPI {
143
- /**
144
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
145
- * @summary Initiate OOB Authentication Challenge
146
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
147
- * @param {*} [options] Override http request option.
148
- * @throws {RequiredError}
149
- */
150
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody: InitiateAuthenticationChallengeBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
151
- }
@@ -12,23 +12,8 @@
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
14
  */
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
15
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.OOBAuthenticationChallengeWebhookNotificationApi = exports.OOBAuthenticationChallengeWebhookNotificationApiFactory = exports.OOBAuthenticationChallengeWebhookNotificationApiFp = exports.OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator = exports.ThreeDsTransactionDeviceChannelEnum = exports.ThreeDsTransactionCategoryEnum = void 0;
26
- const axios_1 = require("axios");
27
- // Some imports not used depending on template conditions
28
- // @ts-ignore
29
- const common_1 = require("./common");
30
- // @ts-ignore
31
- const base_1 = require("./base");
16
+ exports.ThreeDsTransactionDeviceChannelEnum = exports.ThreeDsTransactionCategoryEnum = void 0;
32
17
  exports.ThreeDsTransactionCategoryEnum = {
33
18
  Payment: 'PAYMENT',
34
19
  NonPayment: 'NON_PAYMENT',
@@ -38,104 +23,3 @@ exports.ThreeDsTransactionDeviceChannelEnum = {
38
23
  Browser: 'BROWSER',
39
24
  RequestorInitiated: 'REQUESTOR_INITIATED',
40
25
  };
41
- /**
42
- * OOBAuthenticationChallengeWebhookNotificationApi - axios parameter creator
43
- */
44
- const OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator = function (configuration) {
45
- return {
46
- /**
47
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
48
- * @summary Initiate OOB Authentication Challenge
49
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
50
- * @param {*} [options] Override http request option.
51
- * @throws {RequiredError}
52
- */
53
- initiateAuthenticationChallenge: (initiateAuthenticationChallengeBody_1, ...args_1) => __awaiter(this, [initiateAuthenticationChallengeBody_1, ...args_1], void 0, function* (initiateAuthenticationChallengeBody, options = {}) {
54
- // verify required parameter 'initiateAuthenticationChallengeBody' is not null or undefined
55
- (0, common_1.assertParamExists)('initiateAuthenticationChallenge', 'initiateAuthenticationChallengeBody', initiateAuthenticationChallengeBody);
56
- const localVarPath = `/v1/3ds/oob/challenge/initiate`;
57
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
58
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
59
- let baseOptions;
60
- if (configuration) {
61
- baseOptions = configuration.baseOptions;
62
- }
63
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
64
- const localVarHeaderParameter = {};
65
- const localVarQueryParameter = {};
66
- // authentication basicAuth required
67
- // http basic authentication required
68
- (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
69
- localVarHeaderParameter['Content-Type'] = 'application/json';
70
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
71
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
73
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthenticationChallengeBody, localVarRequestOptions, configuration);
74
- return {
75
- url: (0, common_1.toPathString)(localVarUrlObj),
76
- options: localVarRequestOptions,
77
- };
78
- }),
79
- };
80
- };
81
- exports.OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator = OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator;
82
- /**
83
- * OOBAuthenticationChallengeWebhookNotificationApi - functional programming interface
84
- */
85
- const OOBAuthenticationChallengeWebhookNotificationApiFp = function (configuration) {
86
- const localVarAxiosParamCreator = (0, exports.OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator)(configuration);
87
- return {
88
- /**
89
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
90
- * @summary Initiate OOB Authentication Challenge
91
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
92
- * @param {*} [options] Override http request option.
93
- * @throws {RequiredError}
94
- */
95
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options) {
96
- return __awaiter(this, void 0, void 0, function* () {
97
- var _a, _b, _c;
98
- const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options);
99
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
100
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OOBAuthenticationChallengeWebhookNotificationApi.initiateAuthenticationChallenge']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
101
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
102
- });
103
- },
104
- };
105
- };
106
- exports.OOBAuthenticationChallengeWebhookNotificationApiFp = OOBAuthenticationChallengeWebhookNotificationApiFp;
107
- /**
108
- * OOBAuthenticationChallengeWebhookNotificationApi - factory interface
109
- */
110
- const OOBAuthenticationChallengeWebhookNotificationApiFactory = function (configuration, basePath, axios) {
111
- const localVarFp = (0, exports.OOBAuthenticationChallengeWebhookNotificationApiFp)(configuration);
112
- return {
113
- /**
114
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
115
- * @summary Initiate OOB Authentication Challenge
116
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
117
- * @param {*} [options] Override http request option.
118
- * @throws {RequiredError}
119
- */
120
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options) {
121
- return localVarFp.initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options).then((request) => request(axios, basePath));
122
- },
123
- };
124
- };
125
- exports.OOBAuthenticationChallengeWebhookNotificationApiFactory = OOBAuthenticationChallengeWebhookNotificationApiFactory;
126
- /**
127
- * OOBAuthenticationChallengeWebhookNotificationApi - object-oriented interface
128
- */
129
- class OOBAuthenticationChallengeWebhookNotificationApi extends base_1.BaseAPI {
130
- /**
131
- * In Out-of-Band (OOB) authentication flow, Enfuce sends an authentication challenge webhook notification to the issuer\'s registered endpoint for cardholder\'s approval.
132
- * @summary Initiate OOB Authentication Challenge
133
- * @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- */
137
- initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options) {
138
- return (0, exports.OOBAuthenticationChallengeWebhookNotificationApiFp)(this.configuration).initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options).then((request) => request(this.axios, this.basePath));
139
- }
140
- }
141
- exports.OOBAuthenticationChallengeWebhookNotificationApi = OOBAuthenticationChallengeWebhookNotificationApi;
@@ -11,4 +11,3 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
- export * from './client';
@@ -29,4 +29,3 @@ 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);
@@ -107,7 +107,7 @@ const ActivateTokenApiAxiosParamCreator = function (configuration) {
107
107
  // authentication bearerAuth required
108
108
  // http bearer authentication required
109
109
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
110
- localVarHeaderParameter['Accept'] = 'application/json';
110
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
111
111
  if (xAuditUser != null) {
112
112
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
113
113
  }
@@ -145,7 +145,7 @@ const ActivateTokenApiAxiosParamCreator = function (configuration) {
145
145
  // authentication bearerAuth required
146
146
  // http bearer authentication required
147
147
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
148
- localVarHeaderParameter['Accept'] = 'application/json';
148
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
149
149
  if (xIdempotencyKey != null) {
150
150
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
151
151
  }
@@ -299,7 +299,7 @@ const DeactivateTokenApiAxiosParamCreator = function (configuration) {
299
299
  // authentication bearerAuth required
300
300
  // http bearer authentication required
301
301
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
302
- localVarHeaderParameter['Accept'] = 'application/json';
302
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
303
303
  if (xIdempotencyKey != null) {
304
304
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
305
305
  }
@@ -411,7 +411,7 @@ const EligibleTokenRequestorsApiAxiosParamCreator = function (configuration) {
411
411
  // http bearer authentication required
412
412
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
413
413
  localVarHeaderParameter['Content-Type'] = 'application/json';
414
- localVarHeaderParameter['Accept'] = 'application/json';
414
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
415
415
  if (xAuditUser != null) {
416
416
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
417
417
  }
@@ -528,7 +528,7 @@ const GetTokensApiAxiosParamCreator = function (configuration) {
528
528
  if (includeCardSchemePayload !== undefined) {
529
529
  localVarQueryParameter['includeCardSchemePayload'] = includeCardSchemePayload;
530
530
  }
531
- localVarHeaderParameter['Accept'] = 'application/json';
531
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
532
532
  if (xAuditUser != null) {
533
533
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
534
534
  }
@@ -573,7 +573,7 @@ const GetTokensApiAxiosParamCreator = function (configuration) {
573
573
  if (includeCardSchemePayload !== undefined) {
574
574
  localVarQueryParameter['includeCardSchemePayload'] = includeCardSchemePayload;
575
575
  }
576
- localVarHeaderParameter['Accept'] = 'application/json';
576
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
577
577
  if (xAuditUser != null) {
578
578
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
579
579
  }
@@ -732,7 +732,7 @@ const PushCardsApiAxiosParamCreator = function (configuration) {
732
732
  // http bearer authentication required
733
733
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
734
734
  localVarHeaderParameter['Content-Type'] = 'application/json';
735
- localVarHeaderParameter['Accept'] = 'application/json';
735
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
736
736
  if (xAuditUser != null) {
737
737
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
738
738
  }
@@ -845,7 +845,7 @@ const PushProvisionApiAxiosParamCreator = function (configuration) {
845
845
  // http bearer authentication required
846
846
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
847
847
  localVarHeaderParameter['Content-Type'] = 'application/json';
848
- localVarHeaderParameter['Accept'] = 'application/json';
848
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
849
849
  if (xAuditUser != null) {
850
850
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
851
851
  }
@@ -885,7 +885,7 @@ const PushProvisionApiAxiosParamCreator = function (configuration) {
885
885
  // http bearer authentication required
886
886
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
887
887
  localVarHeaderParameter['Content-Type'] = 'application/json';
888
- localVarHeaderParameter['Accept'] = 'application/json';
888
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
889
889
  if (xAuditUser != null) {
890
890
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
891
891
  }
@@ -925,7 +925,7 @@ const PushProvisionApiAxiosParamCreator = function (configuration) {
925
925
  // http bearer authentication required
926
926
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
927
927
  localVarHeaderParameter['Content-Type'] = 'application/json';
928
- localVarHeaderParameter['Accept'] = 'application/json';
928
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
929
929
  if (xAuditUser != null) {
930
930
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
931
931
  }
@@ -1122,7 +1122,7 @@ const SuspendTokenApiAxiosParamCreator = function (configuration) {
1122
1122
  // authentication bearerAuth required
1123
1123
  // http bearer authentication required
1124
1124
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1125
- localVarHeaderParameter['Accept'] = 'application/json';
1125
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1126
1126
  if (xIdempotencyKey != null) {
1127
1127
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1128
1128
  }
@@ -1237,7 +1237,7 @@ const UnsuspendTokenApiAxiosParamCreator = function (configuration) {
1237
1237
  // authentication bearerAuth required
1238
1238
  // http bearer authentication required
1239
1239
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1240
- localVarHeaderParameter['Accept'] = 'application/json';
1240
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1241
1241
  if (xIdempotencyKey != null) {
1242
1242
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1243
1243
  }
@@ -1,5 +1,5 @@
1
1
  import { type AxiosInstance } from 'axios';
2
- import { type TokenManager } from '../oauth';
2
+ import { type OAuthClientCredentialsManager } from '../oauth';
3
3
  import { Configuration } from './configuration';
4
4
  import { ActivateTokenApi, DeactivateTokenApi, EligibleTokenRequestorsApi, GetTokensApi, PushCardsApi, PushProvisionApi, SuspendTokenApi, UnsuspendTokenApi } from './api';
5
5
  /**
@@ -50,7 +50,7 @@ export declare class WalletClientBuilder {
50
50
  /** The module's host, e.g. `https://api.<tenant>.../issuer`. */
51
51
  baseUrl(baseUrl: string): this;
52
52
  /** Install OAuth: a fresh bearer token on every request + reactive 401 retry. */
53
- oauth(tokens: TokenManager): this;
53
+ oauth(tokens: OAuthClientCredentialsManager): this;
54
54
  /**
55
55
  * Customize the underlying axios instance — set a timeout (`http.defaults.timeout = ...`), a proxy,
56
56
  * default headers, extra interceptors, etc. Runs after OAuth is installed. Composable: multiple
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enfuce/nextgen-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Enfuce nextgen client SDK (TypeScript). One namespaced export per API.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -469,105 +469,3 @@ export type TransactionType = typeof TransactionType[keyof typeof TransactionTyp
469
469
 
470
470
 
471
471
 
472
- /**
473
- * AuthorisationRequestAPIApi - axios parameter creator
474
- */
475
- export const AuthorisationRequestAPIApiAxiosParamCreator = function (configuration?: Configuration) {
476
- return {
477
- /**
478
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
479
- * @summary Authorisation Request API
480
- * @param {AuthRequestBody} authRequestBody
481
- * @param {*} [options] Override http request option.
482
- * @throws {RequiredError}
483
- */
484
- authPost: async (authRequestBody: AuthRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
485
- // verify required parameter 'authRequestBody' is not null or undefined
486
- assertParamExists('authPost', 'authRequestBody', authRequestBody)
487
- const localVarPath = `/auth`;
488
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
489
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
490
- let baseOptions;
491
- if (configuration) {
492
- baseOptions = configuration.baseOptions;
493
- }
494
-
495
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
496
- const localVarHeaderParameter = {} as any;
497
- const localVarQueryParameter = {} as any;
498
-
499
- localVarHeaderParameter['Content-Type'] = 'application/json';
500
- localVarHeaderParameter['Accept'] = 'application/json';
501
-
502
- setSearchParams(localVarUrlObj, localVarQueryParameter);
503
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
504
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
505
- localVarRequestOptions.data = serializeDataIfNeeded(authRequestBody, localVarRequestOptions, configuration)
506
-
507
- return {
508
- url: toPathString(localVarUrlObj),
509
- options: localVarRequestOptions,
510
- };
511
- },
512
- }
513
- };
514
-
515
- /**
516
- * AuthorisationRequestAPIApi - functional programming interface
517
- */
518
- export const AuthorisationRequestAPIApiFp = function(configuration?: Configuration) {
519
- const localVarAxiosParamCreator = AuthorisationRequestAPIApiAxiosParamCreator(configuration)
520
- return {
521
- /**
522
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
523
- * @summary Authorisation Request API
524
- * @param {AuthRequestBody} authRequestBody
525
- * @param {*} [options] Override http request option.
526
- * @throws {RequiredError}
527
- */
528
- async authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponseBody>> {
529
- const localVarAxiosArgs = await localVarAxiosParamCreator.authPost(authRequestBody, options);
530
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
531
- const localVarOperationServerBasePath = operationServerMap['AuthorisationRequestAPIApi.authPost']?.[localVarOperationServerIndex]?.url;
532
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
533
- },
534
- }
535
- };
536
-
537
- /**
538
- * AuthorisationRequestAPIApi - factory interface
539
- */
540
- export const AuthorisationRequestAPIApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
541
- const localVarFp = AuthorisationRequestAPIApiFp(configuration)
542
- return {
543
- /**
544
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
545
- * @summary Authorisation Request API
546
- * @param {AuthRequestBody} authRequestBody
547
- * @param {*} [options] Override http request option.
548
- * @throws {RequiredError}
549
- */
550
- authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseBody> {
551
- return localVarFp.authPost(authRequestBody, options).then((request) => request(axios, basePath));
552
- },
553
- };
554
- };
555
-
556
- /**
557
- * AuthorisationRequestAPIApi - object-oriented interface
558
- */
559
- export class AuthorisationRequestAPIApi extends BaseAPI {
560
- /**
561
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
562
- * @summary Authorisation Request API
563
- * @param {AuthRequestBody} authRequestBody
564
- * @param {*} [options] Override http request option.
565
- * @throws {RequiredError}
566
- */
567
- public authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig) {
568
- return AuthorisationRequestAPIApiFp(this.configuration).authPost(authRequestBody, options).then((request) => request(this.axios, this.basePath));
569
- }
570
- }
571
-
572
-
573
-
@@ -16,5 +16,3 @@
16
16
  export * from "./api";
17
17
  export * from "./configuration";
18
18
 
19
-
20
- export * from './client';