@kard-financial/sdk 8.1.0 → 10.0.0
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 +1 -1
- package/dist/cjs/BaseClient.d.ts +0 -4
- package/dist/cjs/BaseClient.js +2 -3
- package/dist/cjs/api/resources/auth/client/Client.js +19 -7
- package/dist/cjs/api/resources/auth/client/requests/GetTokenRequest.d.ts +2 -0
- package/dist/cjs/api/resources/files/client/Client.js +6 -8
- package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.js +18 -24
- package/dist/cjs/api/resources/ping/client/Client.js +6 -8
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/transactions/client/Client.js +32 -41
- package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +2 -2
- package/dist/cjs/api/resources/transactions/types/TransactionsRequestBody.d.ts +2 -1
- package/dist/cjs/api/resources/users/client/Client.js +24 -32
- package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +18 -24
- package/dist/cjs/api/resources/users/resources/auth/client/Client.js +6 -8
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -16
- package/dist/cjs/api/resources/users/resources/uploads/client/Client.js +18 -24
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +0 -4
- package/dist/esm/BaseClient.mjs +2 -3
- package/dist/esm/api/resources/auth/client/Client.mjs +19 -7
- package/dist/esm/api/resources/auth/client/requests/GetTokenRequest.d.mts +2 -0
- package/dist/esm/api/resources/files/client/Client.mjs +7 -9
- package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.mjs +19 -25
- package/dist/esm/api/resources/ping/client/Client.mjs +7 -9
- package/dist/esm/api/resources/transactions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/transactions/client/Client.mjs +33 -42
- package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +2 -2
- package/dist/esm/api/resources/transactions/types/TransactionsRequestBody.d.mts +2 -1
- package/dist/esm/api/resources/users/client/Client.mjs +25 -33
- package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +19 -25
- package/dist/esm/api/resources/users/resources/auth/client/Client.mjs +7 -9
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +13 -17
- package/dist/esm/api/resources/users/resources/uploads/client/Client.mjs +19 -25
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
@@ -47,7 +47,7 @@ export class FilesClient {
|
|
|
47
47
|
}
|
|
48
48
|
__getMetadata(organizationId_1) {
|
|
49
49
|
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
51
51
|
const { "filter[dateFrom]": filterDateFrom, "filter[dateTo]": filterDateTo, "filter[fileType]": filterFileType, "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, sort, } = request;
|
|
52
52
|
const _queryParams = {};
|
|
53
53
|
if (filterDateFrom != null) {
|
|
@@ -77,18 +77,16 @@ export class FilesClient {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
80
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
81
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
82
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
80
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
83
81
|
const _response = yield core.fetcher({
|
|
84
|
-
url: core.url.join((
|
|
82
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/files/metadata`),
|
|
85
83
|
method: "GET",
|
|
86
84
|
headers: _headers,
|
|
87
85
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
88
|
-
timeoutMs: ((
|
|
89
|
-
maxRetries: (
|
|
86
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
87
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
90
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
-
fetchFn: (
|
|
89
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
92
90
|
logging: this._options.logging,
|
|
93
91
|
});
|
|
94
92
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
@@ -38,25 +38,23 @@ export class SubscriptionsClient {
|
|
|
38
38
|
}
|
|
39
39
|
__get(organizationId_1) {
|
|
40
40
|
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
41
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
42
|
const { "filter[eventName]": filterEventName } = request;
|
|
43
43
|
const _queryParams = {};
|
|
44
44
|
if (filterEventName != null) {
|
|
45
45
|
_queryParams["filter[eventName]"] = filterEventName;
|
|
46
46
|
}
|
|
47
47
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
48
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
49
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
50
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
49
|
const _response = yield core.fetcher({
|
|
52
|
-
url: core.url.join((
|
|
50
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/subscriptions`),
|
|
53
51
|
method: "GET",
|
|
54
52
|
headers: _headers,
|
|
55
53
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
56
|
-
timeoutMs: ((
|
|
57
|
-
maxRetries: (
|
|
54
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
55
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
58
56
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
-
fetchFn: (
|
|
57
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
60
58
|
logging: this._options.logging,
|
|
61
59
|
});
|
|
62
60
|
if (_response.ok) {
|
|
@@ -133,23 +131,21 @@ export class SubscriptionsClient {
|
|
|
133
131
|
}
|
|
134
132
|
__create(organizationId, request, requestOptions) {
|
|
135
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
134
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
137
135
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
138
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
139
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
140
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
141
137
|
const _response = yield core.fetcher({
|
|
142
|
-
url: core.url.join((
|
|
138
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/subscriptions`),
|
|
143
139
|
method: "POST",
|
|
144
140
|
headers: _headers,
|
|
145
141
|
contentType: "application/json",
|
|
146
142
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
147
143
|
requestType: "json",
|
|
148
144
|
body: request,
|
|
149
|
-
timeoutMs: ((
|
|
150
|
-
maxRetries: (
|
|
145
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
146
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
151
147
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
-
fetchFn: (
|
|
148
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
153
149
|
logging: this._options.logging,
|
|
154
150
|
});
|
|
155
151
|
if (_response.ok) {
|
|
@@ -229,23 +225,21 @@ export class SubscriptionsClient {
|
|
|
229
225
|
}
|
|
230
226
|
__update(organizationId, subscriptionId, request, requestOptions) {
|
|
231
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
228
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
233
229
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
234
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
235
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
236
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
230
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
237
231
|
const _response = yield core.fetcher({
|
|
238
|
-
url: core.url.join((
|
|
232
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/subscriptions/${core.url.encodePathParam(subscriptionId)}`),
|
|
239
233
|
method: "PATCH",
|
|
240
234
|
headers: _headers,
|
|
241
235
|
contentType: "application/json",
|
|
242
236
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
243
237
|
requestType: "json",
|
|
244
238
|
body: request,
|
|
245
|
-
timeoutMs: ((
|
|
246
|
-
maxRetries: (
|
|
239
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
240
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
247
241
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
248
|
-
fetchFn: (
|
|
242
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
249
243
|
logging: this._options.logging,
|
|
250
244
|
});
|
|
251
245
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptions } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
@@ -33,19 +33,17 @@ export class PingClient {
|
|
|
33
33
|
}
|
|
34
34
|
__ping(requestOptions) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
37
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
38
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
39
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
37
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
40
38
|
const _response = yield core.fetcher({
|
|
41
|
-
url: core.url.join((
|
|
39
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, "v2/ping"),
|
|
42
40
|
method: "GET",
|
|
43
41
|
headers: _headers,
|
|
44
42
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
-
timeoutMs: ((
|
|
46
|
-
maxRetries: (
|
|
43
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
44
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
47
45
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
-
fetchFn: (
|
|
46
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
49
47
|
logging: this._options.logging,
|
|
50
48
|
});
|
|
51
49
|
if (_response.ok) {
|
|
@@ -167,7 +167,8 @@ export declare class TransactionsClient {
|
|
|
167
167
|
* status: "SETTLED",
|
|
168
168
|
* settledDate: "2024-10-15T14:30:00Z",
|
|
169
169
|
* authorizationDate: "2024-10-15T14:25:00Z",
|
|
170
|
-
* financialInstitutionName: "west union bank"
|
|
170
|
+
* financialInstitutionName: "west union bank",
|
|
171
|
+
* cardLastFours: ["4321"]
|
|
171
172
|
* }
|
|
172
173
|
* }]
|
|
173
174
|
* })
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
@@ -174,7 +174,8 @@ export class TransactionsClient {
|
|
|
174
174
|
* status: "SETTLED",
|
|
175
175
|
* settledDate: "2024-10-15T14:30:00Z",
|
|
176
176
|
* authorizationDate: "2024-10-15T14:25:00Z",
|
|
177
|
-
* financialInstitutionName: "west union bank"
|
|
177
|
+
* financialInstitutionName: "west union bank",
|
|
178
|
+
* cardLastFours: ["4321"]
|
|
178
179
|
* }
|
|
179
180
|
* }]
|
|
180
181
|
* })
|
|
@@ -184,23 +185,21 @@ export class TransactionsClient {
|
|
|
184
185
|
}
|
|
185
186
|
__create(organizationId, request, requestOptions) {
|
|
186
187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
188
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
188
189
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
189
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
190
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
191
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
190
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
192
191
|
const _response = yield core.fetcher({
|
|
193
|
-
url: core.url.join((
|
|
192
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions`),
|
|
194
193
|
method: "POST",
|
|
195
194
|
headers: _headers,
|
|
196
195
|
contentType: "application/json",
|
|
197
196
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
198
197
|
requestType: "json",
|
|
199
198
|
body: request,
|
|
200
|
-
timeoutMs: ((
|
|
201
|
-
maxRetries: (
|
|
199
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
200
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
202
201
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
203
|
-
fetchFn: (
|
|
202
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
204
203
|
logging: this._options.logging,
|
|
205
204
|
});
|
|
206
205
|
if (_response.ok) {
|
|
@@ -279,23 +278,21 @@ export class TransactionsClient {
|
|
|
279
278
|
}
|
|
280
279
|
__createFraudMarkers(organizationId, request, requestOptions) {
|
|
281
280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
281
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
283
282
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
284
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
285
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
286
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
283
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
287
284
|
const _response = yield core.fetcher({
|
|
288
|
-
url: core.url.join((
|
|
285
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/fraud`),
|
|
289
286
|
method: "POST",
|
|
290
287
|
headers: _headers,
|
|
291
288
|
contentType: "application/json",
|
|
292
289
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
293
290
|
requestType: "json",
|
|
294
291
|
body: request,
|
|
295
|
-
timeoutMs: ((
|
|
296
|
-
maxRetries: (
|
|
292
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
293
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
297
294
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
298
|
-
fetchFn: (
|
|
295
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
299
296
|
logging: this._options.logging,
|
|
300
297
|
});
|
|
301
298
|
if (_response.ok) {
|
|
@@ -375,23 +372,21 @@ export class TransactionsClient {
|
|
|
375
372
|
}
|
|
376
373
|
__createAudits(organizationId, userId, request, requestOptions) {
|
|
377
374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
375
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
379
376
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
380
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
381
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
382
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
377
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
383
378
|
const _response = yield core.fetcher({
|
|
384
|
-
url: core.url.join((
|
|
379
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/audits`),
|
|
385
380
|
method: "POST",
|
|
386
381
|
headers: _headers,
|
|
387
382
|
contentType: "application/json",
|
|
388
383
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
389
384
|
requestType: "json",
|
|
390
385
|
body: request,
|
|
391
|
-
timeoutMs: ((
|
|
392
|
-
maxRetries: (
|
|
386
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
387
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
393
388
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
394
|
-
fetchFn: (
|
|
389
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
395
390
|
logging: this._options.logging,
|
|
396
391
|
});
|
|
397
392
|
if (_response.ok) {
|
|
@@ -478,23 +473,21 @@ export class TransactionsClient {
|
|
|
478
473
|
}
|
|
479
474
|
__createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
|
|
480
475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
476
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
482
477
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
483
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
484
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
485
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
478
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
486
479
|
const _response = yield core.fetcher({
|
|
487
|
-
url: core.url.join((
|
|
480
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions/uploads`),
|
|
488
481
|
method: "POST",
|
|
489
482
|
headers: _headers,
|
|
490
483
|
contentType: "application/json",
|
|
491
484
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
492
485
|
requestType: "json",
|
|
493
486
|
body: request,
|
|
494
|
-
timeoutMs: ((
|
|
495
|
-
maxRetries: (
|
|
487
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
488
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
496
489
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
497
|
-
fetchFn: (
|
|
490
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
498
491
|
logging: this._options.logging,
|
|
499
492
|
});
|
|
500
493
|
if (_response.ok) {
|
|
@@ -567,7 +560,7 @@ export class TransactionsClient {
|
|
|
567
560
|
}
|
|
568
561
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
569
562
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
570
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
563
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
571
564
|
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize } = request;
|
|
572
565
|
const _queryParams = {};
|
|
573
566
|
if (pageAfter != null) {
|
|
@@ -580,18 +573,16 @@ export class TransactionsClient {
|
|
|
580
573
|
_queryParams["page[size]"] = pageSize.toString();
|
|
581
574
|
}
|
|
582
575
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
583
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
584
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
585
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
576
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
586
577
|
const _response = yield core.fetcher({
|
|
587
|
-
url: core.url.join((
|
|
578
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/earned-rewards`),
|
|
588
579
|
method: "GET",
|
|
589
580
|
headers: _headers,
|
|
590
581
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
591
|
-
timeoutMs: ((
|
|
592
|
-
maxRetries: (
|
|
582
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
583
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
593
584
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
594
|
-
fetchFn: (
|
|
585
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
595
586
|
logging: this._options.logging,
|
|
596
587
|
});
|
|
597
588
|
if (_response.ok) {
|
|
@@ -20,6 +20,6 @@ export interface CoreTransactionAttributes {
|
|
|
20
20
|
authorizationDate: string;
|
|
21
21
|
/** Name of the financial institution */
|
|
22
22
|
financialInstitutionName: string;
|
|
23
|
-
/** Last four digits of the card used for the transaction. */
|
|
24
|
-
|
|
23
|
+
/** Last four digits of the card(s) that may have been used for the transaction. When the issuer cannot determine which specific card was used, multiple values are provided as candidates. */
|
|
24
|
+
cardLastFours?: string[];
|
|
25
25
|
}
|
|
@@ -136,7 +136,8 @@ import type * as KardApi from "../../../index.mjs";
|
|
|
136
136
|
* status: "SETTLED",
|
|
137
137
|
* settledDate: "2024-10-15T14:30:00Z",
|
|
138
138
|
* authorizationDate: "2024-10-15T14:25:00Z",
|
|
139
|
-
* financialInstitutionName: "west union bank"
|
|
139
|
+
* financialInstitutionName: "west union bank",
|
|
140
|
+
* cardLastFours: ["4321"]
|
|
140
141
|
* }
|
|
141
142
|
* }]
|
|
142
143
|
* }
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
@@ -76,23 +76,21 @@ export class UsersClient {
|
|
|
76
76
|
}
|
|
77
77
|
__create(organizationId, request, requestOptions) {
|
|
78
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
80
80
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
81
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
82
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
83
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
82
|
const _response = yield core.fetcher({
|
|
85
|
-
url: core.url.join((
|
|
83
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users`),
|
|
86
84
|
method: "POST",
|
|
87
85
|
headers: _headers,
|
|
88
86
|
contentType: "application/json",
|
|
89
87
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
88
|
requestType: "json",
|
|
91
89
|
body: request,
|
|
92
|
-
timeoutMs: ((
|
|
93
|
-
maxRetries: (
|
|
90
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
91
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
94
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
-
fetchFn: (
|
|
93
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
96
94
|
logging: this._options.logging,
|
|
97
95
|
});
|
|
98
96
|
if (_response.ok) {
|
|
@@ -176,23 +174,21 @@ export class UsersClient {
|
|
|
176
174
|
}
|
|
177
175
|
__update(organizationId, userId, request, requestOptions) {
|
|
178
176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
177
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
180
178
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
181
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
182
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
183
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
179
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
184
180
|
const _response = yield core.fetcher({
|
|
185
|
-
url: core.url.join((
|
|
181
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
|
|
186
182
|
method: "PUT",
|
|
187
183
|
headers: _headers,
|
|
188
184
|
contentType: "application/json",
|
|
189
185
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
190
186
|
requestType: "json",
|
|
191
187
|
body: request,
|
|
192
|
-
timeoutMs: ((
|
|
193
|
-
maxRetries: (
|
|
188
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
189
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
194
190
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
|
-
fetchFn: (
|
|
191
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
196
192
|
logging: this._options.logging,
|
|
197
193
|
});
|
|
198
194
|
if (_response.ok) {
|
|
@@ -260,20 +256,18 @@ export class UsersClient {
|
|
|
260
256
|
}
|
|
261
257
|
__delete(organizationId, userId, requestOptions) {
|
|
262
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
259
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
264
260
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
265
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
266
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
267
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
261
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
268
262
|
const _response = yield core.fetcher({
|
|
269
|
-
url: core.url.join((
|
|
263
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
|
|
270
264
|
method: "DELETE",
|
|
271
265
|
headers: _headers,
|
|
272
266
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
273
|
-
timeoutMs: ((
|
|
274
|
-
maxRetries: (
|
|
267
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
268
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
275
269
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
276
|
-
fetchFn: (
|
|
270
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
277
271
|
logging: this._options.logging,
|
|
278
272
|
});
|
|
279
273
|
if (_response.ok) {
|
|
@@ -340,20 +334,18 @@ export class UsersClient {
|
|
|
340
334
|
}
|
|
341
335
|
__get(organizationId, userId, requestOptions) {
|
|
342
336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
337
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
344
338
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
345
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
346
|
-
"X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
|
|
347
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
348
340
|
const _response = yield core.fetcher({
|
|
349
|
-
url: core.url.join((
|
|
341
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
|
|
350
342
|
method: "GET",
|
|
351
343
|
headers: _headers,
|
|
352
344
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
353
|
-
timeoutMs: ((
|
|
354
|
-
maxRetries: (
|
|
345
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
346
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
355
347
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
|
-
fetchFn: (
|
|
348
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
357
349
|
logging: this._options.logging,
|
|
358
350
|
});
|
|
359
351
|
if (_response.ok) {
|