@enfuce/nextgen-sdk 0.0.8 → 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 (74) hide show
  1. package/README.md +196 -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/cardholder/api.js +5 -5
  8. package/dist/esm/authorisation-control/api.d.ts +0 -56
  9. package/dist/esm/authorisation-control/api.js +0 -110
  10. package/dist/esm/authorisation-control/index.d.ts +0 -1
  11. package/dist/esm/authorisation-control/index.js +0 -1
  12. package/dist/esm/card/api.js +12 -12
  13. package/dist/esm/cardholder/api.js +5 -5
  14. package/dist/esm/issuer-events/api.d.ts +0 -120
  15. package/dist/esm/issuer-events/api.js +0 -241
  16. package/dist/esm/issuer-events/index.d.ts +0 -1
  17. package/dist/esm/issuer-events/index.js +0 -1
  18. package/dist/esm/oauth/clientCredentials.d.ts +14 -0
  19. package/dist/esm/oauth/clientCredentials.js +39 -0
  20. package/dist/esm/oauth/index.d.ts +1 -1
  21. package/dist/esm/oauth/index.js +1 -1
  22. package/dist/esm/pin/api.d.ts +52 -0
  23. package/dist/esm/pin/api.js +80 -3
  24. package/dist/esm/threeds-oob/api.d.ts +0 -56
  25. package/dist/esm/threeds-oob/api.js +0 -112
  26. package/dist/esm/threeds-oob/index.d.ts +0 -1
  27. package/dist/esm/threeds-oob/index.js +0 -1
  28. package/dist/esm/wallet/api.js +12 -12
  29. package/dist/issuer-events/api.d.ts +0 -120
  30. package/dist/issuer-events/api.js +1 -246
  31. package/dist/issuer-events/index.d.ts +0 -1
  32. package/dist/issuer-events/index.js +0 -1
  33. package/dist/oauth/clientCredentials.d.ts +14 -0
  34. package/dist/oauth/clientCredentials.js +41 -0
  35. package/dist/oauth/index.d.ts +1 -1
  36. package/dist/oauth/index.js +3 -1
  37. package/dist/pin/api.d.ts +52 -0
  38. package/dist/pin/api.js +80 -3
  39. package/dist/threeds-oob/api.d.ts +0 -56
  40. package/dist/threeds-oob/api.js +1 -117
  41. package/dist/threeds-oob/index.d.ts +0 -1
  42. package/dist/threeds-oob/index.js +0 -1
  43. package/dist/wallet/api.js +12 -12
  44. package/package.json +1 -1
  45. package/src/authorisation-control/api.ts +0 -102
  46. package/src/authorisation-control/index.ts +0 -2
  47. package/src/card/api.ts +12 -12
  48. package/src/cardholder/api.ts +5 -5
  49. package/src/issuer-events/api.ts +0 -237
  50. package/src/issuer-events/index.ts +0 -2
  51. package/src/oauth/clientCredentials.ts +44 -0
  52. package/src/oauth/index.ts +8 -1
  53. package/src/pin/api.ts +99 -3
  54. package/src/threeds-oob/api.ts +0 -105
  55. package/src/threeds-oob/index.ts +0 -2
  56. package/src/wallet/api.ts +12 -12
  57. package/dist/authorisation-control/client.d.ts +0 -47
  58. package/dist/authorisation-control/client.js +0 -80
  59. package/dist/esm/authorisation-control/client.d.ts +0 -47
  60. package/dist/esm/authorisation-control/client.js +0 -75
  61. package/dist/esm/issuer-events/client.d.ts +0 -47
  62. package/dist/esm/issuer-events/client.js +0 -75
  63. package/dist/esm/threeds-oob/client.d.ts +0 -47
  64. package/dist/esm/threeds-oob/client.js +0 -75
  65. package/dist/issuer-events/client.d.ts +0 -47
  66. package/dist/issuer-events/client.js +0 -80
  67. package/dist/threeds-oob/client.d.ts +0 -47
  68. package/dist/threeds-oob/client.js +0 -80
  69. package/src/authorisation-control/client.ts +0 -86
  70. package/src/issuer-events/client.ts +0 -86
  71. package/src/threeds-oob/client.ts +0 -86
  72. package/test/authorisation-control.test.ts +0 -71
  73. package/test/issuer-events.test.ts +0 -55
  74. package/test/threeds-oob.test.ts +0 -90
package/README.md CHANGED
@@ -13,7 +13,8 @@ npm install @enfuce/nextgen-sdk
13
13
 
14
14
  Each API is exposed under its own namespace, and every module ships a fluent `<Module>Client`
15
15
  (e.g. `card.CardClient`, `exchangeRate.ExchangeRateClient`) that wires an OAuth-enabled axios
16
- instance to the module's configuration and exposes each API:
16
+ instance to the module's configuration and exposes each API. Every request is authenticated with an
17
+ OAuth2 `client_credentials` bearer token:
17
18
 
18
19
  ```typescript
19
20
  import { oauth, card, config } from '@enfuce/nextgen-sdk';
@@ -26,26 +27,22 @@ const clientCredentialsManager = oauth.clientCredentials({
26
27
  tokenUrl: config.tokenUrl(te),
27
28
  clientId: '<client-id>',
28
29
  clientSecret: '<client-secret>',
29
- scopes: ['issuer/admin.read'],
30
+ scopes: ['issuer/cardholder.read'],
30
31
  });
31
32
 
32
33
  const client = card.CardClient.builder()
33
34
  .baseUrl(config.issuerBaseUrl(te))
34
- .oauth(clientCredentialsManager) // token on every request + reactive 401 retry
35
- .configure((http) => { http.defaults.timeout = 10_000; }) // optional: timeout, proxy, headers …
35
+ .oauth(clientCredentialsManager) // token on every request + reactive 401 retry
36
+ .configure((http) => { http.defaults.timeout = 10_000; }) // optional: timeout, proxy, headers …
36
37
  .build();
37
38
 
38
39
  const { data } = await client.getCardApi().getCard(cardId, 'you@example.com');
39
40
  ```
40
41
 
41
- `build()` works without `.oauth(...)` (unauthenticated), and `configure((http) => …)` hands you the
42
- underlying axios instance for full transport control (timeout, proxy, interceptors). The same builder
43
- is available for every module, including ones whose spec declares no security scheme
44
- (e.g. `exchangeRate.ExchangeRateClient`).
45
-
46
- Prefer the lower level? Build your own axios and pass it through:
47
- `oauth.createOAuthAxios(clientCredentialsManager, axios.create({ timeout: 10_000 }))`, then
48
- `new card.GetCardApi(new card.Configuration({ basePath }), undefined, http)`.
42
+ `.oauth(clientCredentialsManager)` attaches the token at the transport layer, so it works uniformly
43
+ for every module including ones whose spec declares no security scheme
44
+ (e.g. `exchangeRate.ExchangeRateClient`). See [Client customization](#client-customization) for
45
+ transport tuning (timeouts, proxy, interceptors).
49
46
 
50
47
  Keeping the token URL separate from the client identity? Pass a `ClientCredentials` — e.g. with the
51
48
  `config` helper deriving the URL:
@@ -53,24 +50,196 @@ Keeping the token URL separate from the client identity? Pass a `ClientCredentia
53
50
  const clientCredentialsManager = oauth.clientCredentials(config.tokenUrl(te), {
54
51
  clientId: '<client-id>',
55
52
  clientSecret: '<client-secret>',
56
- scopes: ['issuer/admin.read'],
53
+ scopes: ['issuer/cardholder.read'],
54
+ });
55
+ ```
56
+
57
+ ### Inspecting scopes
58
+
59
+ `oauth.availableScopes(...)` discovers the scopes the client is entitled to — it requests a token
60
+ with no scope narrowing and resolves to the granted scopes (sorted, de-duplicated). `oauth.scopesOf(...)`
61
+ decodes the granted scopes from any JWT you already hold. Both yield an empty array for an opaque
62
+ (non-JWT) token and never throw. Server-side only.
63
+
64
+ ```typescript
65
+ import { oauth, config } from '@enfuce/nextgen-sdk';
66
+
67
+ // The client's full entitlement (a live, uncached token request):
68
+ const available = await oauth.availableScopes(config.tokenUrl(te), {
69
+ clientId: '<client-id>',
70
+ clientSecret: '<client-secret>',
57
71
  });
72
+
73
+ // Or decode the scopes granted on a token you already hold:
74
+ const granted = oauth.scopesOf(await clientCredentialsManager.getToken());
75
+ ```
76
+
77
+ ## Client customization
78
+
79
+ `.configure((http) => …)` on any `<Module>Client` builder hands you the underlying axios instance for
80
+ full transport control — timeout, proxy, headers, request/response interceptors, etc. It composes
81
+ with `.oauth(...)`; the OAuth token is attached independently via its own interceptor.
82
+
83
+ ```typescript
84
+ const client = card.CardClient.builder()
85
+ .baseUrl(config.issuerBaseUrl(te))
86
+ .oauth(clientCredentialsManager)
87
+ .configure((http) => {
88
+ http.defaults.headers.common['X-My-Header'] = 'value';
89
+ http.interceptors.request.use(myInterceptor);
90
+ })
91
+ .build();
92
+ ```
93
+
94
+ Prefer the lower level? Build your own axios and pass it through:
95
+ `oauth.createOAuthAxios(clientCredentialsManager, axios.create({ timeout: 10_000 }))`, then
96
+ `new card.GetCardApi(new card.Configuration({ basePath }), undefined, http)`.
97
+
98
+ ### Configuring timeouts
99
+
100
+ axios timeouts are a single value in **milliseconds** (applied per request). Set it on the axios
101
+ instance via `.configure(...)`:
102
+
103
+ ```typescript
104
+ const client = card.CardClient.builder()
105
+ .baseUrl(config.issuerBaseUrl(te))
106
+ .oauth(clientCredentialsManager)
107
+ .configure((http) => { http.defaults.timeout = 10_000; }) // 10s
108
+ .build();
109
+ ```
110
+
111
+ ## API modules
112
+
113
+ Each module builds the same way — pick the base URL for the module's host
114
+ (`config.issuerBaseUrl`, `config.processorBaseUrl`, or `config.exchangeRateBaseUrl`) and reuse the
115
+ shared `clientCredentialsManager`. Every call resolves to an axios response, so read `.data`. The
116
+ snippets below assume `te` and `clientCredentialsManager` are in scope.
117
+
118
+ ### `cardholder` — issuer host
119
+
120
+ ```typescript
121
+ import { cardholder, config } from '@enfuce/nextgen-sdk';
122
+
123
+ const client = cardholder.CardholderClient.builder().baseUrl(config.issuerBaseUrl(te)).oauth(clientCredentialsManager).build();
124
+
125
+ const { data: holder } = await client.getCardholderApi().getCardholderById(cardholderId, 'you@example.com');
126
+ const { data: cards } = await client.getCardsByCardholderIdApi()
127
+ .getCardsByCardholderId(cardholderId, undefined, undefined, 'you@example.com');
128
+ ```
129
+
130
+ ### `card` — issuer host
131
+
132
+ ```typescript
133
+ import { card, config } from '@enfuce/nextgen-sdk';
134
+
135
+ const client = card.CardClient.builder().baseUrl(config.issuerBaseUrl(te)).oauth(clientCredentialsManager).build();
136
+
137
+ const { data } = await client.getCardApi().getCard(cardId, 'you@example.com');
138
+ await client.updateCardApi().activateCard(cardId, undefined, 'you@example.com'); // (id, idempotencyKey, auditUser)
139
+ ```
140
+
141
+ ### `wallet` — issuer host
142
+
143
+ ```typescript
144
+ import { wallet, config } from '@enfuce/nextgen-sdk';
145
+
146
+ const client = wallet.WalletClient.builder().baseUrl(config.issuerBaseUrl(te)).oauth(clientCredentialsManager).build();
147
+
148
+ const { data: tokens } = await client.getTokensApi().getTokens(cardId, false, undefined, 'you@example.com');
149
+ ```
150
+
151
+ ### `pin` — issuer host
152
+
153
+ ```typescript
154
+ import { pin, config } from '@enfuce/nextgen-sdk';
155
+
156
+ const client = pin.PinClient.builder().baseUrl(config.issuerBaseUrl(te)).oauth(clientCredentialsManager).build();
157
+
158
+ const { data } = await client.pINOperationsUsingPKIApi().viewPin(viewPinRequestBody, 'you@example.com');
159
+ ```
160
+
161
+ ### `exchangeRate` — exchange-rate host
162
+
163
+ ```typescript
164
+ import { exchangeRate, config } from '@enfuce/nextgen-sdk';
165
+
166
+ const client = exchangeRate.ExchangeRateClient.builder().baseUrl(config.exchangeRateBaseUrl(te)).oauth(clientCredentialsManager).build();
167
+
168
+ const { data: currencies } = await client.getECBSupportedCurrenciesApi().getEcbSupportedCurrenciesV1();
169
+ const { data: rate } = await client.getECBExchangeRateApi().getEcbRateV1('EUR', 'USD');
170
+ ```
171
+
172
+ ### `threeds` — processor host
173
+
174
+ ```typescript
175
+ import { threeds, config } from '@enfuce/nextgen-sdk';
176
+
177
+ const client = threeds.ThreedsClient.builder().baseUrl(config.processorBaseUrl(te)).oauth(clientCredentialsManager).build();
178
+
179
+ await client.threeDSApi().handleAuthenticationChallengeResult(challengeResultBody);
180
+ ```
181
+
182
+ ### `cards` — processor host
183
+
184
+ ```typescript
185
+ import { cards, config } from '@enfuce/nextgen-sdk';
186
+
187
+ const client = cards.CardsClient.builder().baseUrl(config.processorBaseUrl(te)).oauth(clientCredentialsManager).build();
188
+
189
+ await client.cardsApi().resetPinCounter(cardId, sequenceNumber);
190
+ ```
191
+
192
+ ## Webhooks (model-only modules)
193
+
194
+ Some APIs describe payloads Enfuce sends **to you** — you implement the endpoint, Enfuce POSTs to it.
195
+ These specs are shipped **model-only**: the namespace exports just the payload types (no
196
+ `<Module>Client`, no API classes). Use the types to type the inbound request body:
197
+
198
+ ```typescript
199
+ import type { issuerEvents } from '@enfuce/nextgen-sdk';
200
+
201
+ const event = JSON.parse(payload) as issuerEvents.CardEvent;
202
+ ```
203
+
204
+ `authorisationControl` is synchronous — Enfuce expects an approve/decline decision in the response,
205
+ so you both consume a type and return one (`AuthResponseCode` is a runtime value, import it, not
206
+ `import type`):
207
+
208
+ ```typescript
209
+ import { authorisationControl } from '@enfuce/nextgen-sdk';
210
+
211
+ const request = JSON.parse(payload) as authorisationControl.AuthRequestBody;
212
+ const decision: authorisationControl.AuthResponseBody = {
213
+ authResponseCode: authorisationControl.AuthResponseCode.Approved,
214
+ };
215
+ ```
216
+
217
+ | Namespace | Payload type(s) |
218
+ | --- | --- |
219
+ | `issuerEvents` | `CardEvent`, `CardholderEvent`, `TokenEvent` |
220
+ | `authorisationControl` | `AuthRequestBody` → `AuthResponseBody` (synchronous decision) |
221
+ | `threedsOob` | `InitiateAuthenticationChallengeBody` |
222
+ | `transactionEvent` | `TransactionEvent` |
223
+
224
+ > A runnable Express example of all of the above (both the API modules and the webhook receivers)
225
+ > lives in [`examples/backends/typescript`](../../examples/backends/typescript).
226
+
227
+ ## File Parsing (model-only module)
228
+
229
+ Some specs describe a **file** Enfuce produces for you to ingest (not an HTTP API). These are shipped
230
+ **model-only** too — the namespace exports just the types, and you parse the file's JSON into them.
231
+ `clearingFileCopy` is a clearing (settlement) file: a `FileData` header plus a list of records.
232
+
233
+ ```typescript
234
+ import type { clearingFileCopy } from '@enfuce/nextgen-sdk';
235
+
236
+ const file = JSON.parse(clearingFileCopyJson) as clearingFileCopy.FileData;
237
+ file.records?.forEach((record) => { /* … */ });
58
238
  ```
59
239
 
60
- ## Available APIs
61
-
62
- - `oauth` OAuth2 `client_credentials` token-management helper
63
- - `card`
64
- - `wallet`
65
- - `cardholder`
66
- - `pin`
67
- - `issuerEvents`
68
- - `authorisationControl`
69
- - `cards`
70
- - `threeds`
71
- - `threedsOob`
72
- - `clearingFileCopy`
73
- - `transactionEvent`
240
+ | Namespace | Type(s) |
241
+ | --- | --- |
242
+ | `clearingFileCopy` | `FileData` (clearing file header + records) |
74
243
 
75
244
  ## Requirements
76
245
 
@@ -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 Account {
17
13
  /**
18
14
  * Available amount before this transaction has been processed.
@@ -415,55 +411,3 @@ export declare const TransactionType: {
415
411
  readonly Aft: "AFT";
416
412
  };
417
413
  export type TransactionType = typeof TransactionType[keyof typeof TransactionType];
418
- /**
419
- * AuthorisationRequestAPIApi - axios parameter creator
420
- */
421
- export declare const AuthorisationRequestAPIApiAxiosParamCreator: (configuration?: Configuration) => {
422
- /**
423
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
424
- * @summary Authorisation Request API
425
- * @param {AuthRequestBody} authRequestBody
426
- * @param {*} [options] Override http request option.
427
- * @throws {RequiredError}
428
- */
429
- authPost: (authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
430
- };
431
- /**
432
- * AuthorisationRequestAPIApi - functional programming interface
433
- */
434
- export declare const AuthorisationRequestAPIApiFp: (configuration?: Configuration) => {
435
- /**
436
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
437
- * @summary Authorisation Request API
438
- * @param {AuthRequestBody} authRequestBody
439
- * @param {*} [options] Override http request option.
440
- * @throws {RequiredError}
441
- */
442
- authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponseBody>>;
443
- };
444
- /**
445
- * AuthorisationRequestAPIApi - factory interface
446
- */
447
- export declare const AuthorisationRequestAPIApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
448
- /**
449
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
450
- * @summary Authorisation Request API
451
- * @param {AuthRequestBody} authRequestBody
452
- * @param {*} [options] Override http request option.
453
- * @throws {RequiredError}
454
- */
455
- authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseBody>;
456
- };
457
- /**
458
- * AuthorisationRequestAPIApi - object-oriented interface
459
- */
460
- export declare class AuthorisationRequestAPIApi extends BaseAPI {
461
- /**
462
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
463
- * @summary Authorisation Request API
464
- * @param {AuthRequestBody} authRequestBody
465
- * @param {*} [options] Override http request option.
466
- * @throws {RequiredError}
467
- */
468
- authPost(authRequestBody: AuthRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthResponseBody, any, {}>>;
469
- }
@@ -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.AuthorisationRequestAPIApi = exports.AuthorisationRequestAPIApiFactory = exports.AuthorisationRequestAPIApiFp = exports.AuthorisationRequestAPIApiAxiosParamCreator = exports.TransactionType = exports.TransactionFeeTypeEnum = exports.TokenWalletIdentifierEnum = exports.MessageFunctionAuthorization = exports.MessageCategoryAuthorization = exports.CardholderVerificationMethod = exports.CardEntryMode = exports.CardApplicationSelectionEnum = exports.AuthResponseCode = 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.TransactionType = exports.TransactionFeeTypeEnum = exports.TokenWalletIdentifierEnum = exports.MessageFunctionAuthorization = exports.MessageCategoryAuthorization = exports.CardholderVerificationMethod = exports.CardEntryMode = exports.CardApplicationSelectionEnum = exports.AuthResponseCode = void 0;
32
17
  /**
33
18
  * Indicates whether the authorisation request is approved or declined. Possible enums: * `APPROVED` - Approved * `PARTIALLY_APPROVED` - Approved for partial amount * `DO_NOT_HONOR` - Do not honor (**Note**: Card schemes recommend to use this only when other options do not apply) * `NOT_SUFFICIENT_FUNDS` - Inadequate funds * `NOT_PERMITTED` - Transaction not permitted to cardholder * `EXCEEDS_AMOUNT_LIMIT` - Exceeds approval amount limit * `RESTRICTED_CARD` - Restricted card (card invalid in region or country) * `EXCEEDS_WITHDRAWAL_FREQUENCY_LIMIT` - Exceeds withdrawal frequency limit * `SYSTEM_ERROR` - System malfunction
34
19
  */
@@ -121,102 +106,3 @@ exports.TransactionType = {
121
106
  Reversal: 'REVERSAL',
122
107
  Aft: 'AFT',
123
108
  };
124
- /**
125
- * AuthorisationRequestAPIApi - axios parameter creator
126
- */
127
- const AuthorisationRequestAPIApiAxiosParamCreator = function (configuration) {
128
- return {
129
- /**
130
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
131
- * @summary Authorisation Request API
132
- * @param {AuthRequestBody} authRequestBody
133
- * @param {*} [options] Override http request option.
134
- * @throws {RequiredError}
135
- */
136
- authPost: (authRequestBody_1, ...args_1) => __awaiter(this, [authRequestBody_1, ...args_1], void 0, function* (authRequestBody, options = {}) {
137
- // verify required parameter 'authRequestBody' is not null or undefined
138
- (0, common_1.assertParamExists)('authPost', 'authRequestBody', authRequestBody);
139
- const localVarPath = `/auth`;
140
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
142
- let baseOptions;
143
- if (configuration) {
144
- baseOptions = configuration.baseOptions;
145
- }
146
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
147
- const localVarHeaderParameter = {};
148
- const localVarQueryParameter = {};
149
- localVarHeaderParameter['Content-Type'] = 'application/json';
150
- localVarHeaderParameter['Accept'] = 'application/json';
151
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
152
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
154
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authRequestBody, localVarRequestOptions, configuration);
155
- return {
156
- url: (0, common_1.toPathString)(localVarUrlObj),
157
- options: localVarRequestOptions,
158
- };
159
- }),
160
- };
161
- };
162
- exports.AuthorisationRequestAPIApiAxiosParamCreator = AuthorisationRequestAPIApiAxiosParamCreator;
163
- /**
164
- * AuthorisationRequestAPIApi - functional programming interface
165
- */
166
- const AuthorisationRequestAPIApiFp = function (configuration) {
167
- const localVarAxiosParamCreator = (0, exports.AuthorisationRequestAPIApiAxiosParamCreator)(configuration);
168
- return {
169
- /**
170
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
171
- * @summary Authorisation Request API
172
- * @param {AuthRequestBody} authRequestBody
173
- * @param {*} [options] Override http request option.
174
- * @throws {RequiredError}
175
- */
176
- authPost(authRequestBody, options) {
177
- return __awaiter(this, void 0, void 0, function* () {
178
- var _a, _b, _c;
179
- const localVarAxiosArgs = yield localVarAxiosParamCreator.authPost(authRequestBody, options);
180
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
181
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthorisationRequestAPIApi.authPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
182
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
183
- });
184
- },
185
- };
186
- };
187
- exports.AuthorisationRequestAPIApiFp = AuthorisationRequestAPIApiFp;
188
- /**
189
- * AuthorisationRequestAPIApi - factory interface
190
- */
191
- const AuthorisationRequestAPIApiFactory = function (configuration, basePath, axios) {
192
- const localVarFp = (0, exports.AuthorisationRequestAPIApiFp)(configuration);
193
- return {
194
- /**
195
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
196
- * @summary Authorisation Request API
197
- * @param {AuthRequestBody} authRequestBody
198
- * @param {*} [options] Override http request option.
199
- * @throws {RequiredError}
200
- */
201
- authPost(authRequestBody, options) {
202
- return localVarFp.authPost(authRequestBody, options).then((request) => request(axios, basePath));
203
- },
204
- };
205
- };
206
- exports.AuthorisationRequestAPIApiFactory = AuthorisationRequestAPIApiFactory;
207
- /**
208
- * AuthorisationRequestAPIApi - object-oriented interface
209
- */
210
- class AuthorisationRequestAPIApi extends base_1.BaseAPI {
211
- /**
212
- * Enfuce sends an authorisation request to the issuer/ledger, when it expects an authorisation decision from the recipient.
213
- * @summary Authorisation Request API
214
- * @param {AuthRequestBody} authRequestBody
215
- * @param {*} [options] Override http request option.
216
- * @throws {RequiredError}
217
- */
218
- authPost(authRequestBody, options) {
219
- return (0, exports.AuthorisationRequestAPIApiFp)(this.configuration).authPost(authRequestBody, options).then((request) => request(this.axios, this.basePath));
220
- }
221
- }
222
- exports.AuthorisationRequestAPIApi = AuthorisationRequestAPIApi;
@@ -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);
package/dist/card/api.js CHANGED
@@ -184,7 +184,7 @@ const CreateCardApiAxiosParamCreator = function (configuration) {
184
184
  // http bearer authentication required
185
185
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
186
186
  localVarHeaderParameter['Content-Type'] = 'application/json';
187
- localVarHeaderParameter['Accept'] = 'application/json';
187
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
188
188
  if (xAuditUser != null) {
189
189
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
190
190
  }
@@ -303,7 +303,7 @@ const CreatePINControlAccessTokenApiAxiosParamCreator = function (configuration)
303
303
  // http bearer authentication required
304
304
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
305
305
  localVarHeaderParameter['Content-Type'] = 'application/json';
306
- localVarHeaderParameter['Accept'] = 'application/json';
306
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
307
307
  if (xAuditUser != null) {
308
308
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
309
309
  }
@@ -415,7 +415,7 @@ const GetCardApiAxiosParamCreator = function (configuration) {
415
415
  // authentication bearerAuth required
416
416
  // http bearer authentication required
417
417
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
418
- localVarHeaderParameter['Accept'] = 'application/json';
418
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
419
419
  if (xAuditUser != null) {
420
420
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
421
421
  }
@@ -454,7 +454,7 @@ const GetCardApiAxiosParamCreator = function (configuration) {
454
454
  // http bearer authentication required
455
455
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
456
456
  localVarHeaderParameter['Content-Type'] = 'application/json';
457
- localVarHeaderParameter['Accept'] = 'application/json';
457
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
458
458
  if (xAuditUser != null) {
459
459
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
460
460
  }
@@ -494,7 +494,7 @@ const GetCardApiAxiosParamCreator = function (configuration) {
494
494
  if (mainCardId !== undefined) {
495
495
  localVarQueryParameter['mainCardId'] = mainCardId;
496
496
  }
497
- localVarHeaderParameter['Accept'] = 'application/json';
497
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
498
498
  if (xAuditUser != null) {
499
499
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
500
500
  }
@@ -687,7 +687,7 @@ const GetCardPaymentInfoApiAxiosParamCreator = function (configuration) {
687
687
  // http bearer authentication required
688
688
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
689
689
  localVarHeaderParameter['Content-Type'] = 'application/json';
690
- localVarHeaderParameter['Accept'] = 'application/json';
690
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
691
691
  if (xAuditUser != null) {
692
692
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
693
693
  }
@@ -799,7 +799,7 @@ const GetPlasticManufacturingHistoryApiAxiosParamCreator = function (configurati
799
799
  // authentication bearerAuth required
800
800
  // http bearer authentication required
801
801
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
802
- localVarHeaderParameter['Accept'] = 'application/json';
802
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
803
803
  if (xAuditUser != null) {
804
804
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
805
805
  }
@@ -908,7 +908,7 @@ const UpdateCardApiAxiosParamCreator = function (configuration) {
908
908
  // authentication bearerAuth required
909
909
  // http bearer authentication required
910
910
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
911
- localVarHeaderParameter['Accept'] = 'application/json';
911
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
912
912
  if (xIdempotencyKey != null) {
913
913
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
914
914
  }
@@ -952,7 +952,7 @@ const UpdateCardApiAxiosParamCreator = function (configuration) {
952
952
  // http bearer authentication required
953
953
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
954
954
  localVarHeaderParameter['Content-Type'] = 'application/json';
955
- localVarHeaderParameter['Accept'] = 'application/json';
955
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
956
956
  if (xAuditUser != null) {
957
957
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
958
958
  }
@@ -993,7 +993,7 @@ const UpdateCardApiAxiosParamCreator = function (configuration) {
993
993
  // http bearer authentication required
994
994
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
995
995
  localVarHeaderParameter['Content-Type'] = 'application/json';
996
- localVarHeaderParameter['Accept'] = 'application/json';
996
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
997
997
  if (xIdempotencyKey != null) {
998
998
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
999
999
  }
@@ -1035,7 +1035,7 @@ const UpdateCardApiAxiosParamCreator = function (configuration) {
1035
1035
  // authentication bearerAuth required
1036
1036
  // http bearer authentication required
1037
1037
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1038
- localVarHeaderParameter['Accept'] = 'application/json';
1038
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1039
1039
  if (xIdempotencyKey != null) {
1040
1040
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1041
1041
  }
@@ -1078,7 +1078,7 @@ const UpdateCardApiAxiosParamCreator = function (configuration) {
1078
1078
  // http bearer authentication required
1079
1079
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1080
1080
  localVarHeaderParameter['Content-Type'] = 'application/json';
1081
- localVarHeaderParameter['Accept'] = 'application/json';
1081
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1082
1082
  if (xIdempotencyKey != null) {
1083
1083
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1084
1084
  }
@@ -1438,7 +1438,7 @@ const CreateCardholderApiAxiosParamCreator = function (configuration) {
1438
1438
  // http bearer authentication required
1439
1439
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1440
1440
  localVarHeaderParameter['Content-Type'] = 'application/json';
1441
- localVarHeaderParameter['Accept'] = 'application/json';
1441
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1442
1442
  if (xIdempotencyKey != null) {
1443
1443
  localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1444
1444
  }
@@ -1553,7 +1553,7 @@ const GetCardholderApiAxiosParamCreator = function (configuration) {
1553
1553
  // authentication bearerAuth required
1554
1554
  // http bearer authentication required
1555
1555
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1556
- localVarHeaderParameter['Accept'] = 'application/json';
1556
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1557
1557
  if (xAuditUser != null) {
1558
1558
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1559
1559
  }
@@ -1592,7 +1592,7 @@ const GetCardholderApiAxiosParamCreator = function (configuration) {
1592
1592
  if (customerNumber !== undefined) {
1593
1593
  localVarQueryParameter['customerNumber'] = customerNumber;
1594
1594
  }
1595
- localVarHeaderParameter['Accept'] = 'application/json';
1595
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1596
1596
  if (xAuditUser != null) {
1597
1597
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1598
1598
  }
@@ -1747,7 +1747,7 @@ const GetCardsByCardholderIdApiAxiosParamCreator = function (configuration) {
1747
1747
  if (size !== undefined) {
1748
1748
  localVarQueryParameter['size'] = size;
1749
1749
  }
1750
- localVarHeaderParameter['Accept'] = 'application/json';
1750
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1751
1751
  if (xAuditUser != null) {
1752
1752
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1753
1753
  }
@@ -1865,7 +1865,7 @@ const UpdateCardholderApiAxiosParamCreator = function (configuration) {
1865
1865
  // http bearer authentication required
1866
1866
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1867
1867
  localVarHeaderParameter['Content-Type'] = 'application/json';
1868
- localVarHeaderParameter['Accept'] = 'application/json';
1868
+ localVarHeaderParameter['Accept'] = 'application/json,application/problem+json';
1869
1869
  if (xAuditUser != null) {
1870
1870
  localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1871
1871
  }