@kard-financial/sdk 8.1.0 → 9.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.js +30 -40
- 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.mjs +31 -41
- 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";
|
|
@@ -45,23 +45,21 @@ export class UploadsClient {
|
|
|
45
45
|
}
|
|
46
46
|
__create(organizationId, userId, request, requestOptions) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
49
49
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
50
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
51
|
-
"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,
|
|
52
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
50
|
+
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);
|
|
53
51
|
const _response = yield core.fetcher({
|
|
54
|
-
url: core.url.join((
|
|
52
|
+
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)}/uploads`),
|
|
55
53
|
method: "POST",
|
|
56
54
|
headers: _headers,
|
|
57
55
|
contentType: "application/json",
|
|
58
56
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
59
57
|
requestType: "json",
|
|
60
58
|
body: request,
|
|
61
|
-
timeoutMs: ((
|
|
62
|
-
maxRetries: (
|
|
59
|
+
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,
|
|
60
|
+
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,
|
|
63
61
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
-
fetchFn: (
|
|
62
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
65
63
|
logging: this._options.logging,
|
|
66
64
|
});
|
|
67
65
|
if (_response.ok) {
|
|
@@ -169,23 +167,21 @@ export class UploadsClient {
|
|
|
169
167
|
}
|
|
170
168
|
__createPart(organizationId, userId, uploadId, request, requestOptions) {
|
|
171
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
173
171
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
174
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
175
|
-
"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,
|
|
176
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
|
+
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);
|
|
177
173
|
const _response = yield core.fetcher({
|
|
178
|
-
url: core.url.join((
|
|
174
|
+
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)}/uploads/${core.url.encodePathParam(uploadId)}/parts`),
|
|
179
175
|
method: "PUT",
|
|
180
176
|
headers: _headers,
|
|
181
177
|
contentType: "application/json",
|
|
182
178
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
183
179
|
requestType: "json",
|
|
184
180
|
body: request,
|
|
185
|
-
timeoutMs: ((
|
|
186
|
-
maxRetries: (
|
|
181
|
+
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,
|
|
182
|
+
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,
|
|
187
183
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
188
|
-
fetchFn: (
|
|
184
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
189
185
|
logging: this._options.logging,
|
|
190
186
|
});
|
|
191
187
|
if (_response.ok) {
|
|
@@ -263,23 +259,21 @@ export class UploadsClient {
|
|
|
263
259
|
}
|
|
264
260
|
__update(organizationId, userId, uploadId, request, requestOptions) {
|
|
265
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
262
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
267
263
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
268
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
269
|
-
"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,
|
|
270
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
|
+
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);
|
|
271
265
|
const _response = yield core.fetcher({
|
|
272
|
-
url: core.url.join((
|
|
266
|
+
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)}/uploads/${core.url.encodePathParam(uploadId)}`),
|
|
273
267
|
method: "PUT",
|
|
274
268
|
headers: _headers,
|
|
275
269
|
contentType: "application/json",
|
|
276
270
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
277
271
|
requestType: "json",
|
|
278
272
|
body: request,
|
|
279
|
-
timeoutMs: ((
|
|
280
|
-
maxRetries: (
|
|
273
|
+
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,
|
|
274
|
+
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,
|
|
281
275
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
282
|
-
fetchFn: (
|
|
276
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
283
277
|
logging: this._options.logging,
|
|
284
278
|
});
|
|
285
279
|
if (_response.ok) {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "9.0.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "9.0.0";
|