@kard-financial/sdk 4.5.0 → 4.7.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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/commons/errors/index.d.ts +1 -0
- package/dist/cjs/api/resources/commons/errors/index.js +1 -0
- package/dist/cjs/api/resources/commons/types/NotificationType.d.ts +1 -0
- package/dist/cjs/api/resources/commons/types/NotificationType.js +1 -0
- package/dist/cjs/api/resources/files/index.d.ts +0 -1
- package/dist/cjs/api/resources/files/index.js +0 -1
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +0 -1
- package/dist/cjs/api/resources/notifications/types/FileResultData.d.ts +6 -0
- package/dist/cjs/api/resources/notifications/types/FileResultData.js +3 -0
- package/dist/cjs/api/resources/notifications/types/NotificationDataUnion.d.ts +4 -1
- package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +15 -0
- package/dist/cjs/api/resources/notifications/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/types/index.js +1 -0
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/transactions/client/Client.js +97 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadAttributes.d.ts +4 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadAttributes.js +3 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadData.d.ts +5 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadData.js +3 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadRequestBody.d.ts +5 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadRequestBody.js +3 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadUrlResponse.d.ts +25 -0
- package/dist/cjs/api/resources/transactions/types/CreateFileUploadUrlResponse.js +3 -0
- package/dist/cjs/api/resources/transactions/types/FileUploadUrlAttributes.d.ts +9 -0
- package/dist/cjs/api/resources/transactions/types/FileUploadUrlAttributes.js +3 -0
- package/dist/cjs/api/resources/transactions/types/FileUploadUrlData.d.ts +7 -0
- package/dist/cjs/api/resources/transactions/types/FileUploadUrlData.js +3 -0
- package/dist/cjs/api/resources/transactions/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/transactions/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/commons/errors/index.d.mts +1 -0
- package/dist/esm/api/resources/commons/errors/index.mjs +1 -0
- package/dist/esm/api/resources/commons/types/NotificationType.d.mts +1 -0
- package/dist/esm/api/resources/commons/types/NotificationType.mjs +1 -0
- package/dist/esm/api/resources/files/index.d.mts +0 -1
- package/dist/esm/api/resources/files/index.mjs +0 -1
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/notifications/types/FileResultData.d.mts +6 -0
- package/dist/esm/api/resources/notifications/types/FileResultData.mjs +2 -0
- package/dist/esm/api/resources/notifications/types/NotificationDataUnion.d.mts +4 -1
- package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +15 -0
- package/dist/esm/api/resources/notifications/types/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/types/index.mjs +1 -0
- package/dist/esm/api/resources/transactions/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/transactions/client/Client.mjs +97 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadAttributes.d.mts +4 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadAttributes.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadData.d.mts +5 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadData.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadRequestBody.d.mts +5 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadRequestBody.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadUrlResponse.d.mts +25 -0
- package/dist/esm/api/resources/transactions/types/CreateFileUploadUrlResponse.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/FileUploadUrlAttributes.d.mts +9 -0
- package/dist/esm/api/resources/transactions/types/FileUploadUrlAttributes.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/FileUploadUrlData.d.mts +7 -0
- package/dist/esm/api/resources/transactions/types/FileUploadUrlData.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/index.d.mts +6 -0
- package/dist/esm/api/resources/transactions/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +88 -0
- package/dist/cjs/api/resources/files/errors/index.d.ts +0 -1
- package/dist/cjs/api/resources/files/errors/index.js +0 -17
- package/dist/esm/api/resources/files/errors/index.d.mts +0 -1
- package/dist/esm/api/resources/files/errors/index.mjs +0 -1
- /package/dist/cjs/api/resources/{files → commons}/errors/ForbiddenError.d.ts +0 -0
- /package/dist/cjs/api/resources/{files → commons}/errors/ForbiddenError.js +0 -0
- /package/dist/esm/api/resources/{files → commons}/errors/ForbiddenError.d.mts +0 -0
- /package/dist/esm/api/resources/{files → commons}/errors/ForbiddenError.mjs +0 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/4.
|
|
46
|
+
"X-Fern-SDK-Version": "4.7.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/4.7.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ConflictError.js"), exports);
|
|
18
18
|
__exportStar(require("./DoesNotExistError.js"), exports);
|
|
19
|
+
__exportStar(require("./ForbiddenError.js"), exports);
|
|
19
20
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
20
21
|
__exportStar(require("./InvalidRequest.js"), exports);
|
|
21
22
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
@@ -9,5 +9,6 @@ export declare const NotificationType: {
|
|
|
9
9
|
readonly Location: "location";
|
|
10
10
|
readonly UserOffer: "userOffer";
|
|
11
11
|
readonly AuditUpdate: "auditUpdate";
|
|
12
|
+
readonly FileProcessingResult: "fileProcessingResult";
|
|
12
13
|
};
|
|
13
14
|
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
@@ -15,5 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client/index.js"), exports);
|
|
18
|
-
__exportStar(require("./errors/index.js"), exports);
|
|
19
18
|
__exportStar(require("./types/index.js"), exports);
|
|
@@ -5,7 +5,6 @@ export * from "./commons/errors/index.js";
|
|
|
5
5
|
export * as commons from "./commons/index.js";
|
|
6
6
|
export * from "./commons/types/index.js";
|
|
7
7
|
export * from "./files/client/requests/index.js";
|
|
8
|
-
export * from "./files/errors/index.js";
|
|
9
8
|
export * as files from "./files/index.js";
|
|
10
9
|
export * from "./files/types/index.js";
|
|
11
10
|
export * as notifications from "./notifications/index.js";
|
|
@@ -44,7 +44,6 @@ __exportStar(require("./commons/errors/index.js"), exports);
|
|
|
44
44
|
exports.commons = __importStar(require("./commons/index.js"));
|
|
45
45
|
__exportStar(require("./commons/types/index.js"), exports);
|
|
46
46
|
__exportStar(require("./files/client/requests/index.js"), exports);
|
|
47
|
-
__exportStar(require("./files/errors/index.js"), exports);
|
|
48
47
|
exports.files = __importStar(require("./files/index.js"));
|
|
49
48
|
__exportStar(require("./files/types/index.js"), exports);
|
|
50
49
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.js";
|
|
2
|
-
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.Offer | KardApi.NotificationDataUnion.Merchant | KardApi.NotificationDataUnion.Location | KardApi.NotificationDataUnion.UserOffer | KardApi.NotificationDataUnion.AuditUpdate;
|
|
2
|
+
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.Offer | KardApi.NotificationDataUnion.Merchant | KardApi.NotificationDataUnion.Location | KardApi.NotificationDataUnion.UserOffer | KardApi.NotificationDataUnion.AuditUpdate | KardApi.NotificationDataUnion.FileProcessingResult;
|
|
3
3
|
export declare namespace NotificationDataUnion {
|
|
4
4
|
interface EarnedRewardApproved extends KardApi.EarnedRewardApprovedData {
|
|
5
5
|
type: "earnedRewardApproved";
|
|
@@ -31,4 +31,7 @@ export declare namespace NotificationDataUnion {
|
|
|
31
31
|
interface AuditUpdate extends KardApi.AuditUpdateData {
|
|
32
32
|
type: "auditUpdate";
|
|
33
33
|
}
|
|
34
|
+
interface FileProcessingResult extends KardApi.FileResultData {
|
|
35
|
+
type: "fileProcessingResult";
|
|
36
|
+
}
|
|
34
37
|
}
|
|
@@ -436,8 +436,23 @@ import type * as KardApi from "../../../index.js";
|
|
|
436
436
|
* }
|
|
437
437
|
* }
|
|
438
438
|
* }
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* {
|
|
442
|
+
* data: {
|
|
443
|
+
* type: "fileProcessingResult",
|
|
444
|
+
* id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
445
|
+
* attributes: {
|
|
446
|
+
* fileName: "incomingTxns_2026-06-23.jsonl",
|
|
447
|
+
* lastModified: "2026-06-23T12:00:00Z",
|
|
448
|
+
* sentAt: "2026-06-23T12:05:00Z",
|
|
449
|
+
* downloadUrl: "https://example.com/processed/incomingTxns_2026-06-23.csv"
|
|
450
|
+
* }
|
|
451
|
+
* }
|
|
452
|
+
* }
|
|
439
453
|
*/
|
|
440
454
|
export interface NotificationPayload {
|
|
441
455
|
data: KardApi.NotificationDataUnion;
|
|
442
456
|
meta?: KardApi.NotificationMetadata;
|
|
457
|
+
errors?: KardApi.ErrorObject[];
|
|
443
458
|
}
|
|
@@ -19,6 +19,7 @@ export * from "./EarnedRewardSettledData.js";
|
|
|
19
19
|
export * from "./FailedTransactionAttributes.js";
|
|
20
20
|
export * from "./FailedTransactionData.js";
|
|
21
21
|
export * from "./FailedTransactionRelationships.js";
|
|
22
|
+
export * from "./FileResultData.js";
|
|
22
23
|
export * from "./LocationAddress.js";
|
|
23
24
|
export * from "./LocationCoordinates.js";
|
|
24
25
|
export * from "./LocationStatus.js";
|
|
@@ -35,6 +35,7 @@ __exportStar(require("./EarnedRewardSettledData.js"), exports);
|
|
|
35
35
|
__exportStar(require("./FailedTransactionAttributes.js"), exports);
|
|
36
36
|
__exportStar(require("./FailedTransactionData.js"), exports);
|
|
37
37
|
__exportStar(require("./FailedTransactionRelationships.js"), exports);
|
|
38
|
+
__exportStar(require("./FileResultData.js"), exports);
|
|
38
39
|
__exportStar(require("./LocationAddress.js"), exports);
|
|
39
40
|
__exportStar(require("./LocationCoordinates.js"), exports);
|
|
40
41
|
__exportStar(require("./LocationStatus.js"), exports);
|
|
@@ -233,6 +233,40 @@ export declare class TransactionsClient {
|
|
|
233
233
|
*/
|
|
234
234
|
createAudits(organizationId: KardApi.OrganizationId, userId: string, request: KardApi.CreateAuditRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateAuditResponseBody>;
|
|
235
235
|
private __createAudits;
|
|
236
|
+
/**
|
|
237
|
+
* Generates up to 10 presigned PUT URLs for uploading JSONL transaction files (up to 5GB each) directly
|
|
238
|
+
* to storage. Each URL is valid for 15 minutes. Use the returned URL to upload the file via an HTTP PUT request with the
|
|
239
|
+
* binary file content as the body. If a URL expires before the upload completes, you must request a new one.
|
|
240
|
+
* Files can be uploaded as plain JSONL or as a gzip-compressed file.
|
|
241
|
+
* Only `coreTransaction` type is supported for bulk file uploads.
|
|
242
|
+
* <b>Required scopes:</b> `transaction:write`
|
|
243
|
+
*
|
|
244
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
245
|
+
* @param {KardApi.CreateFileUploadRequestBody} request
|
|
246
|
+
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
247
|
+
*
|
|
248
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
249
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
250
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
251
|
+
* @throws {@link KardApi.InternalServerError}
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
255
|
+
* data: [{
|
|
256
|
+
* type: "incomingTransactionsFile",
|
|
257
|
+
* attributes: {
|
|
258
|
+
* filename: "transaction_12345.jsonl"
|
|
259
|
+
* }
|
|
260
|
+
* }, {
|
|
261
|
+
* type: "incomingTransactionsFile",
|
|
262
|
+
* attributes: {
|
|
263
|
+
* filename: "transaction_67890.jsonl"
|
|
264
|
+
* }
|
|
265
|
+
* }]
|
|
266
|
+
* })
|
|
267
|
+
*/
|
|
268
|
+
createBulkTransactionsUploadUrl(organizationId: KardApi.OrganizationId, request: KardApi.CreateFileUploadRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateFileUploadUrlResponse>;
|
|
269
|
+
private __createBulkTransactionsUploadUrl;
|
|
236
270
|
/**
|
|
237
271
|
* Retrieve rewarded transaction history for a specific user. Returns only SETTLED transactions within the last 12 months.
|
|
238
272
|
* <br/>
|
|
@@ -471,6 +471,103 @@ class TransactionsClient {
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* Generates up to 10 presigned PUT URLs for uploading JSONL transaction files (up to 5GB each) directly
|
|
476
|
+
* to storage. Each URL is valid for 15 minutes. Use the returned URL to upload the file via an HTTP PUT request with the
|
|
477
|
+
* binary file content as the body. If a URL expires before the upload completes, you must request a new one.
|
|
478
|
+
* Files can be uploaded as plain JSONL or as a gzip-compressed file.
|
|
479
|
+
* Only `coreTransaction` type is supported for bulk file uploads.
|
|
480
|
+
* <b>Required scopes:</b> `transaction:write`
|
|
481
|
+
*
|
|
482
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
483
|
+
* @param {KardApi.CreateFileUploadRequestBody} request
|
|
484
|
+
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
485
|
+
*
|
|
486
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
487
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
488
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
489
|
+
* @throws {@link KardApi.InternalServerError}
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
493
|
+
* data: [{
|
|
494
|
+
* type: "incomingTransactionsFile",
|
|
495
|
+
* attributes: {
|
|
496
|
+
* filename: "transaction_12345.jsonl"
|
|
497
|
+
* }
|
|
498
|
+
* }, {
|
|
499
|
+
* type: "incomingTransactionsFile",
|
|
500
|
+
* attributes: {
|
|
501
|
+
* filename: "transaction_67890.jsonl"
|
|
502
|
+
* }
|
|
503
|
+
* }]
|
|
504
|
+
* })
|
|
505
|
+
*/
|
|
506
|
+
createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
|
|
507
|
+
return core.HttpResponsePromise.fromPromise(this.__createBulkTransactionsUploadUrl(organizationId, request, requestOptions));
|
|
508
|
+
}
|
|
509
|
+
__createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
|
|
510
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
511
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
512
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
513
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
514
|
+
const _response = yield core.fetcher({
|
|
515
|
+
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/upload`),
|
|
516
|
+
method: "POST",
|
|
517
|
+
headers: _headers,
|
|
518
|
+
contentType: "application/json",
|
|
519
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
520
|
+
requestType: "json",
|
|
521
|
+
body: request,
|
|
522
|
+
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,
|
|
523
|
+
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,
|
|
524
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
525
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
526
|
+
logging: this._options.logging,
|
|
527
|
+
});
|
|
528
|
+
if (_response.ok) {
|
|
529
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
530
|
+
}
|
|
531
|
+
if (_response.error.reason === "status-code") {
|
|
532
|
+
switch (_response.error.statusCode) {
|
|
533
|
+
case 403:
|
|
534
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
535
|
+
case 401:
|
|
536
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
537
|
+
case 400:
|
|
538
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
539
|
+
case 500:
|
|
540
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
541
|
+
default:
|
|
542
|
+
throw new errors.KardApiError({
|
|
543
|
+
statusCode: _response.error.statusCode,
|
|
544
|
+
body: _response.error.body,
|
|
545
|
+
rawResponse: _response.rawResponse,
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
switch (_response.error.reason) {
|
|
550
|
+
case "non-json":
|
|
551
|
+
throw new errors.KardApiError({
|
|
552
|
+
statusCode: _response.error.statusCode,
|
|
553
|
+
body: _response.error.rawBody,
|
|
554
|
+
rawResponse: _response.rawResponse,
|
|
555
|
+
});
|
|
556
|
+
case "body-is-null":
|
|
557
|
+
throw new errors.KardApiError({
|
|
558
|
+
statusCode: _response.error.statusCode,
|
|
559
|
+
rawResponse: _response.rawResponse,
|
|
560
|
+
});
|
|
561
|
+
case "timeout":
|
|
562
|
+
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/upload.");
|
|
563
|
+
case "unknown":
|
|
564
|
+
throw new errors.KardApiError({
|
|
565
|
+
message: _response.error.errorMessage,
|
|
566
|
+
rawResponse: _response.rawResponse,
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
}
|
|
474
571
|
/**
|
|
475
572
|
* Retrieve rewarded transaction history for a specific user. Returns only SETTLED transactions within the last 12 months.
|
|
476
573
|
* <br/>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* data: [{
|
|
6
|
+
* type: "incomingTransactionsFile",
|
|
7
|
+
* id: "2NxKz7TYmqVH8UrjGP1xK3hF2gs",
|
|
8
|
+
* attributes: {
|
|
9
|
+
* url: "https://s3.amazonaws.com/bucket/key1?X-Amz-Algorithm=...",
|
|
10
|
+
* expiresIn: 900
|
|
11
|
+
* }
|
|
12
|
+
* }, {
|
|
13
|
+
* type: "incomingTransactionsFile",
|
|
14
|
+
* id: "3PqLa8UZnrWI9VskHQ2yL4iG3ht",
|
|
15
|
+
* attributes: {
|
|
16
|
+
* url: "https://s3.amazonaws.com/bucket/key2?X-Amz-Algorithm=...",
|
|
17
|
+
* expiresIn: 900
|
|
18
|
+
* }
|
|
19
|
+
* }]
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateFileUploadUrlResponse {
|
|
23
|
+
/** List of created file upload sessions. */
|
|
24
|
+
data: KardApi.FileUploadUrlData[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FileUploadUrlAttributes {
|
|
2
|
+
/**
|
|
3
|
+
* Presigned PUT URL for uploading the file directly to storage.
|
|
4
|
+
* Use HTTP PUT with binary body. Expires after 15 minutes.
|
|
5
|
+
*/
|
|
6
|
+
url: string;
|
|
7
|
+
/** Time in seconds until the presigned URL expires (900) */
|
|
8
|
+
expiresIn: number;
|
|
9
|
+
}
|
|
@@ -12,7 +12,13 @@ export * from "./CreateAuditRequestBody.js";
|
|
|
12
12
|
export * from "./CreateAuditRequestDataUnion.js";
|
|
13
13
|
export * from "./CreateAuditResponseBody.js";
|
|
14
14
|
export * from "./CreateAuditResponseDataUnion.js";
|
|
15
|
+
export * from "./CreateFileUploadAttributes.js";
|
|
16
|
+
export * from "./CreateFileUploadData.js";
|
|
17
|
+
export * from "./CreateFileUploadRequestBody.js";
|
|
18
|
+
export * from "./CreateFileUploadUrlResponse.js";
|
|
15
19
|
export * from "./DirectionType.js";
|
|
20
|
+
export * from "./FileUploadUrlAttributes.js";
|
|
21
|
+
export * from "./FileUploadUrlData.js";
|
|
16
22
|
export * from "./FinancialInstitutionName.js";
|
|
17
23
|
export * from "./FraudulentTransactionAttributes.js";
|
|
18
24
|
export * from "./FraudulentTransactionData.js";
|
|
@@ -28,7 +28,13 @@ __exportStar(require("./CreateAuditRequestBody.js"), exports);
|
|
|
28
28
|
__exportStar(require("./CreateAuditRequestDataUnion.js"), exports);
|
|
29
29
|
__exportStar(require("./CreateAuditResponseBody.js"), exports);
|
|
30
30
|
__exportStar(require("./CreateAuditResponseDataUnion.js"), exports);
|
|
31
|
+
__exportStar(require("./CreateFileUploadAttributes.js"), exports);
|
|
32
|
+
__exportStar(require("./CreateFileUploadData.js"), exports);
|
|
33
|
+
__exportStar(require("./CreateFileUploadRequestBody.js"), exports);
|
|
34
|
+
__exportStar(require("./CreateFileUploadUrlResponse.js"), exports);
|
|
31
35
|
__exportStar(require("./DirectionType.js"), exports);
|
|
36
|
+
__exportStar(require("./FileUploadUrlAttributes.js"), exports);
|
|
37
|
+
__exportStar(require("./FileUploadUrlData.js"), exports);
|
|
32
38
|
__exportStar(require("./FinancialInstitutionName.js"), exports);
|
|
33
39
|
__exportStar(require("./FraudulentTransactionAttributes.js"), exports);
|
|
34
40
|
__exportStar(require("./FraudulentTransactionData.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.
|
|
1
|
+
export declare const SDK_VERSION = "4.7.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/4.
|
|
9
|
+
"X-Fern-SDK-Version": "4.7.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/4.7.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -9,5 +9,6 @@ export declare const NotificationType: {
|
|
|
9
9
|
readonly Location: "location";
|
|
10
10
|
readonly UserOffer: "userOffer";
|
|
11
11
|
readonly AuditUpdate: "auditUpdate";
|
|
12
|
+
readonly FileProcessingResult: "fileProcessingResult";
|
|
12
13
|
};
|
|
13
14
|
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
@@ -5,7 +5,6 @@ export * from "./commons/errors/index.mjs";
|
|
|
5
5
|
export * as commons from "./commons/index.mjs";
|
|
6
6
|
export * from "./commons/types/index.mjs";
|
|
7
7
|
export * from "./files/client/requests/index.mjs";
|
|
8
|
-
export * from "./files/errors/index.mjs";
|
|
9
8
|
export * as files from "./files/index.mjs";
|
|
10
9
|
export * from "./files/types/index.mjs";
|
|
11
10
|
export * as notifications from "./notifications/index.mjs";
|
|
@@ -5,7 +5,6 @@ export * from "./commons/errors/index.mjs";
|
|
|
5
5
|
export * as commons from "./commons/index.mjs";
|
|
6
6
|
export * from "./commons/types/index.mjs";
|
|
7
7
|
export * from "./files/client/requests/index.mjs";
|
|
8
|
-
export * from "./files/errors/index.mjs";
|
|
9
8
|
export * as files from "./files/index.mjs";
|
|
10
9
|
export * from "./files/types/index.mjs";
|
|
11
10
|
export * as notifications from "./notifications/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.mjs";
|
|
2
|
-
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.Offer | KardApi.NotificationDataUnion.Merchant | KardApi.NotificationDataUnion.Location | KardApi.NotificationDataUnion.UserOffer | KardApi.NotificationDataUnion.AuditUpdate;
|
|
2
|
+
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.Offer | KardApi.NotificationDataUnion.Merchant | KardApi.NotificationDataUnion.Location | KardApi.NotificationDataUnion.UserOffer | KardApi.NotificationDataUnion.AuditUpdate | KardApi.NotificationDataUnion.FileProcessingResult;
|
|
3
3
|
export declare namespace NotificationDataUnion {
|
|
4
4
|
interface EarnedRewardApproved extends KardApi.EarnedRewardApprovedData {
|
|
5
5
|
type: "earnedRewardApproved";
|
|
@@ -31,4 +31,7 @@ export declare namespace NotificationDataUnion {
|
|
|
31
31
|
interface AuditUpdate extends KardApi.AuditUpdateData {
|
|
32
32
|
type: "auditUpdate";
|
|
33
33
|
}
|
|
34
|
+
interface FileProcessingResult extends KardApi.FileResultData {
|
|
35
|
+
type: "fileProcessingResult";
|
|
36
|
+
}
|
|
34
37
|
}
|
|
@@ -436,8 +436,23 @@ import type * as KardApi from "../../../index.mjs";
|
|
|
436
436
|
* }
|
|
437
437
|
* }
|
|
438
438
|
* }
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* {
|
|
442
|
+
* data: {
|
|
443
|
+
* type: "fileProcessingResult",
|
|
444
|
+
* id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
445
|
+
* attributes: {
|
|
446
|
+
* fileName: "incomingTxns_2026-06-23.jsonl",
|
|
447
|
+
* lastModified: "2026-06-23T12:00:00Z",
|
|
448
|
+
* sentAt: "2026-06-23T12:05:00Z",
|
|
449
|
+
* downloadUrl: "https://example.com/processed/incomingTxns_2026-06-23.csv"
|
|
450
|
+
* }
|
|
451
|
+
* }
|
|
452
|
+
* }
|
|
439
453
|
*/
|
|
440
454
|
export interface NotificationPayload {
|
|
441
455
|
data: KardApi.NotificationDataUnion;
|
|
442
456
|
meta?: KardApi.NotificationMetadata;
|
|
457
|
+
errors?: KardApi.ErrorObject[];
|
|
443
458
|
}
|
|
@@ -19,6 +19,7 @@ export * from "./EarnedRewardSettledData.mjs";
|
|
|
19
19
|
export * from "./FailedTransactionAttributes.mjs";
|
|
20
20
|
export * from "./FailedTransactionData.mjs";
|
|
21
21
|
export * from "./FailedTransactionRelationships.mjs";
|
|
22
|
+
export * from "./FileResultData.mjs";
|
|
22
23
|
export * from "./LocationAddress.mjs";
|
|
23
24
|
export * from "./LocationCoordinates.mjs";
|
|
24
25
|
export * from "./LocationStatus.mjs";
|
|
@@ -19,6 +19,7 @@ export * from "./EarnedRewardSettledData.mjs";
|
|
|
19
19
|
export * from "./FailedTransactionAttributes.mjs";
|
|
20
20
|
export * from "./FailedTransactionData.mjs";
|
|
21
21
|
export * from "./FailedTransactionRelationships.mjs";
|
|
22
|
+
export * from "./FileResultData.mjs";
|
|
22
23
|
export * from "./LocationAddress.mjs";
|
|
23
24
|
export * from "./LocationCoordinates.mjs";
|
|
24
25
|
export * from "./LocationStatus.mjs";
|
|
@@ -233,6 +233,40 @@ export declare class TransactionsClient {
|
|
|
233
233
|
*/
|
|
234
234
|
createAudits(organizationId: KardApi.OrganizationId, userId: string, request: KardApi.CreateAuditRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateAuditResponseBody>;
|
|
235
235
|
private __createAudits;
|
|
236
|
+
/**
|
|
237
|
+
* Generates up to 10 presigned PUT URLs for uploading JSONL transaction files (up to 5GB each) directly
|
|
238
|
+
* to storage. Each URL is valid for 15 minutes. Use the returned URL to upload the file via an HTTP PUT request with the
|
|
239
|
+
* binary file content as the body. If a URL expires before the upload completes, you must request a new one.
|
|
240
|
+
* Files can be uploaded as plain JSONL or as a gzip-compressed file.
|
|
241
|
+
* Only `coreTransaction` type is supported for bulk file uploads.
|
|
242
|
+
* <b>Required scopes:</b> `transaction:write`
|
|
243
|
+
*
|
|
244
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
245
|
+
* @param {KardApi.CreateFileUploadRequestBody} request
|
|
246
|
+
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
247
|
+
*
|
|
248
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
249
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
250
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
251
|
+
* @throws {@link KardApi.InternalServerError}
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
255
|
+
* data: [{
|
|
256
|
+
* type: "incomingTransactionsFile",
|
|
257
|
+
* attributes: {
|
|
258
|
+
* filename: "transaction_12345.jsonl"
|
|
259
|
+
* }
|
|
260
|
+
* }, {
|
|
261
|
+
* type: "incomingTransactionsFile",
|
|
262
|
+
* attributes: {
|
|
263
|
+
* filename: "transaction_67890.jsonl"
|
|
264
|
+
* }
|
|
265
|
+
* }]
|
|
266
|
+
* })
|
|
267
|
+
*/
|
|
268
|
+
createBulkTransactionsUploadUrl(organizationId: KardApi.OrganizationId, request: KardApi.CreateFileUploadRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateFileUploadUrlResponse>;
|
|
269
|
+
private __createBulkTransactionsUploadUrl;
|
|
236
270
|
/**
|
|
237
271
|
* Retrieve rewarded transaction history for a specific user. Returns only SETTLED transactions within the last 12 months.
|
|
238
272
|
* <br/>
|
|
@@ -435,6 +435,103 @@ export class TransactionsClient {
|
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* Generates up to 10 presigned PUT URLs for uploading JSONL transaction files (up to 5GB each) directly
|
|
440
|
+
* to storage. Each URL is valid for 15 minutes. Use the returned URL to upload the file via an HTTP PUT request with the
|
|
441
|
+
* binary file content as the body. If a URL expires before the upload completes, you must request a new one.
|
|
442
|
+
* Files can be uploaded as plain JSONL or as a gzip-compressed file.
|
|
443
|
+
* Only `coreTransaction` type is supported for bulk file uploads.
|
|
444
|
+
* <b>Required scopes:</b> `transaction:write`
|
|
445
|
+
*
|
|
446
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
447
|
+
* @param {KardApi.CreateFileUploadRequestBody} request
|
|
448
|
+
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
449
|
+
*
|
|
450
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
451
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
452
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
453
|
+
* @throws {@link KardApi.InternalServerError}
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
457
|
+
* data: [{
|
|
458
|
+
* type: "incomingTransactionsFile",
|
|
459
|
+
* attributes: {
|
|
460
|
+
* filename: "transaction_12345.jsonl"
|
|
461
|
+
* }
|
|
462
|
+
* }, {
|
|
463
|
+
* type: "incomingTransactionsFile",
|
|
464
|
+
* attributes: {
|
|
465
|
+
* filename: "transaction_67890.jsonl"
|
|
466
|
+
* }
|
|
467
|
+
* }]
|
|
468
|
+
* })
|
|
469
|
+
*/
|
|
470
|
+
createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
|
|
471
|
+
return core.HttpResponsePromise.fromPromise(this.__createBulkTransactionsUploadUrl(organizationId, request, requestOptions));
|
|
472
|
+
}
|
|
473
|
+
__createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
476
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
477
|
+
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);
|
|
478
|
+
const _response = yield core.fetcher({
|
|
479
|
+
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/upload`),
|
|
480
|
+
method: "POST",
|
|
481
|
+
headers: _headers,
|
|
482
|
+
contentType: "application/json",
|
|
483
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
484
|
+
requestType: "json",
|
|
485
|
+
body: request,
|
|
486
|
+
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,
|
|
487
|
+
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,
|
|
488
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
489
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
490
|
+
logging: this._options.logging,
|
|
491
|
+
});
|
|
492
|
+
if (_response.ok) {
|
|
493
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
494
|
+
}
|
|
495
|
+
if (_response.error.reason === "status-code") {
|
|
496
|
+
switch (_response.error.statusCode) {
|
|
497
|
+
case 403:
|
|
498
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
499
|
+
case 401:
|
|
500
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
501
|
+
case 400:
|
|
502
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
503
|
+
case 500:
|
|
504
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
505
|
+
default:
|
|
506
|
+
throw new errors.KardApiError({
|
|
507
|
+
statusCode: _response.error.statusCode,
|
|
508
|
+
body: _response.error.body,
|
|
509
|
+
rawResponse: _response.rawResponse,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
switch (_response.error.reason) {
|
|
514
|
+
case "non-json":
|
|
515
|
+
throw new errors.KardApiError({
|
|
516
|
+
statusCode: _response.error.statusCode,
|
|
517
|
+
body: _response.error.rawBody,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
519
|
+
});
|
|
520
|
+
case "body-is-null":
|
|
521
|
+
throw new errors.KardApiError({
|
|
522
|
+
statusCode: _response.error.statusCode,
|
|
523
|
+
rawResponse: _response.rawResponse,
|
|
524
|
+
});
|
|
525
|
+
case "timeout":
|
|
526
|
+
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/upload.");
|
|
527
|
+
case "unknown":
|
|
528
|
+
throw new errors.KardApiError({
|
|
529
|
+
message: _response.error.errorMessage,
|
|
530
|
+
rawResponse: _response.rawResponse,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}
|
|
438
535
|
/**
|
|
439
536
|
* Retrieve rewarded transaction history for a specific user. Returns only SETTLED transactions within the last 12 months.
|
|
440
537
|
* <br/>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* data: [{
|
|
6
|
+
* type: "incomingTransactionsFile",
|
|
7
|
+
* id: "2NxKz7TYmqVH8UrjGP1xK3hF2gs",
|
|
8
|
+
* attributes: {
|
|
9
|
+
* url: "https://s3.amazonaws.com/bucket/key1?X-Amz-Algorithm=...",
|
|
10
|
+
* expiresIn: 900
|
|
11
|
+
* }
|
|
12
|
+
* }, {
|
|
13
|
+
* type: "incomingTransactionsFile",
|
|
14
|
+
* id: "3PqLa8UZnrWI9VskHQ2yL4iG3ht",
|
|
15
|
+
* attributes: {
|
|
16
|
+
* url: "https://s3.amazonaws.com/bucket/key2?X-Amz-Algorithm=...",
|
|
17
|
+
* expiresIn: 900
|
|
18
|
+
* }
|
|
19
|
+
* }]
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateFileUploadUrlResponse {
|
|
23
|
+
/** List of created file upload sessions. */
|
|
24
|
+
data: KardApi.FileUploadUrlData[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FileUploadUrlAttributes {
|
|
2
|
+
/**
|
|
3
|
+
* Presigned PUT URL for uploading the file directly to storage.
|
|
4
|
+
* Use HTTP PUT with binary body. Expires after 15 minutes.
|
|
5
|
+
*/
|
|
6
|
+
url: string;
|
|
7
|
+
/** Time in seconds until the presigned URL expires (900) */
|
|
8
|
+
expiresIn: number;
|
|
9
|
+
}
|
|
@@ -12,7 +12,13 @@ export * from "./CreateAuditRequestBody.mjs";
|
|
|
12
12
|
export * from "./CreateAuditRequestDataUnion.mjs";
|
|
13
13
|
export * from "./CreateAuditResponseBody.mjs";
|
|
14
14
|
export * from "./CreateAuditResponseDataUnion.mjs";
|
|
15
|
+
export * from "./CreateFileUploadAttributes.mjs";
|
|
16
|
+
export * from "./CreateFileUploadData.mjs";
|
|
17
|
+
export * from "./CreateFileUploadRequestBody.mjs";
|
|
18
|
+
export * from "./CreateFileUploadUrlResponse.mjs";
|
|
15
19
|
export * from "./DirectionType.mjs";
|
|
20
|
+
export * from "./FileUploadUrlAttributes.mjs";
|
|
21
|
+
export * from "./FileUploadUrlData.mjs";
|
|
16
22
|
export * from "./FinancialInstitutionName.mjs";
|
|
17
23
|
export * from "./FraudulentTransactionAttributes.mjs";
|
|
18
24
|
export * from "./FraudulentTransactionData.mjs";
|
|
@@ -12,7 +12,13 @@ export * from "./CreateAuditRequestBody.mjs";
|
|
|
12
12
|
export * from "./CreateAuditRequestDataUnion.mjs";
|
|
13
13
|
export * from "./CreateAuditResponseBody.mjs";
|
|
14
14
|
export * from "./CreateAuditResponseDataUnion.mjs";
|
|
15
|
+
export * from "./CreateFileUploadAttributes.mjs";
|
|
16
|
+
export * from "./CreateFileUploadData.mjs";
|
|
17
|
+
export * from "./CreateFileUploadRequestBody.mjs";
|
|
18
|
+
export * from "./CreateFileUploadUrlResponse.mjs";
|
|
15
19
|
export * from "./DirectionType.mjs";
|
|
20
|
+
export * from "./FileUploadUrlAttributes.mjs";
|
|
21
|
+
export * from "./FileUploadUrlData.mjs";
|
|
16
22
|
export * from "./FinancialInstitutionName.mjs";
|
|
17
23
|
export * from "./FraudulentTransactionAttributes.mjs";
|
|
18
24
|
export * from "./FraudulentTransactionData.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.
|
|
1
|
+
export declare const SDK_VERSION = "4.7.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.
|
|
1
|
+
export const SDK_VERSION = "4.7.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -724,6 +724,94 @@ await client.transactions.createAudits("organization-123", "user-123", {
|
|
|
724
724
|
</dl>
|
|
725
725
|
|
|
726
726
|
|
|
727
|
+
</dd>
|
|
728
|
+
</dl>
|
|
729
|
+
</details>
|
|
730
|
+
|
|
731
|
+
<details><summary><code>client.transactions.<a href="/src/api/resources/transactions/client/Client.ts">createBulkTransactionsUploadUrl</a>(organizationId, { ...params }) -> KardApi.CreateFileUploadUrlResponse</code></summary>
|
|
732
|
+
<dl>
|
|
733
|
+
<dd>
|
|
734
|
+
|
|
735
|
+
#### 📝 Description
|
|
736
|
+
|
|
737
|
+
<dl>
|
|
738
|
+
<dd>
|
|
739
|
+
|
|
740
|
+
<dl>
|
|
741
|
+
<dd>
|
|
742
|
+
|
|
743
|
+
Generates up to 10 presigned PUT URLs for uploading JSONL transaction files (up to 5GB each) directly
|
|
744
|
+
to storage. Each URL is valid for 15 minutes. Use the returned URL to upload the file via an HTTP PUT request with the
|
|
745
|
+
binary file content as the body. If a URL expires before the upload completes, you must request a new one.
|
|
746
|
+
Files can be uploaded as plain JSONL or as a gzip-compressed file.
|
|
747
|
+
Only `coreTransaction` type is supported for bulk file uploads.
|
|
748
|
+
<b>Required scopes:</b> `transaction:write`
|
|
749
|
+
</dd>
|
|
750
|
+
</dl>
|
|
751
|
+
</dd>
|
|
752
|
+
</dl>
|
|
753
|
+
|
|
754
|
+
#### 🔌 Usage
|
|
755
|
+
|
|
756
|
+
<dl>
|
|
757
|
+
<dd>
|
|
758
|
+
|
|
759
|
+
<dl>
|
|
760
|
+
<dd>
|
|
761
|
+
|
|
762
|
+
```typescript
|
|
763
|
+
await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
764
|
+
data: [{
|
|
765
|
+
type: "incomingTransactionsFile",
|
|
766
|
+
attributes: {
|
|
767
|
+
filename: "transaction_12345.jsonl"
|
|
768
|
+
}
|
|
769
|
+
}, {
|
|
770
|
+
type: "incomingTransactionsFile",
|
|
771
|
+
attributes: {
|
|
772
|
+
filename: "transaction_67890.jsonl"
|
|
773
|
+
}
|
|
774
|
+
}]
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
```
|
|
778
|
+
</dd>
|
|
779
|
+
</dl>
|
|
780
|
+
</dd>
|
|
781
|
+
</dl>
|
|
782
|
+
|
|
783
|
+
#### ⚙️ Parameters
|
|
784
|
+
|
|
785
|
+
<dl>
|
|
786
|
+
<dd>
|
|
787
|
+
|
|
788
|
+
<dl>
|
|
789
|
+
<dd>
|
|
790
|
+
|
|
791
|
+
**organizationId:** `KardApi.OrganizationId`
|
|
792
|
+
|
|
793
|
+
</dd>
|
|
794
|
+
</dl>
|
|
795
|
+
|
|
796
|
+
<dl>
|
|
797
|
+
<dd>
|
|
798
|
+
|
|
799
|
+
**request:** `KardApi.CreateFileUploadRequestBody`
|
|
800
|
+
|
|
801
|
+
</dd>
|
|
802
|
+
</dl>
|
|
803
|
+
|
|
804
|
+
<dl>
|
|
805
|
+
<dd>
|
|
806
|
+
|
|
807
|
+
**requestOptions:** `TransactionsClient.RequestOptions`
|
|
808
|
+
|
|
809
|
+
</dd>
|
|
810
|
+
</dl>
|
|
811
|
+
</dd>
|
|
812
|
+
</dl>
|
|
813
|
+
|
|
814
|
+
|
|
727
815
|
</dd>
|
|
728
816
|
</dl>
|
|
729
817
|
</details>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ForbiddenError.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ForbiddenError.js"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ForbiddenError.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ForbiddenError.mjs";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|