@kard-financial/sdk 4.6.0 → 4.8.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.
Files changed (94) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/commons/errors/index.d.ts +1 -0
  3. package/dist/cjs/api/resources/commons/errors/index.js +1 -0
  4. package/dist/cjs/api/resources/files/index.d.ts +0 -1
  5. package/dist/cjs/api/resources/files/index.js +0 -1
  6. package/dist/cjs/api/resources/index.d.ts +0 -1
  7. package/dist/cjs/api/resources/index.js +0 -1
  8. package/dist/cjs/api/resources/transactions/client/Client.d.ts +34 -0
  9. package/dist/cjs/api/resources/transactions/client/Client.js +97 -0
  10. package/dist/cjs/api/resources/transactions/types/CreateFileUploadAttributes.d.ts +4 -0
  11. package/dist/cjs/api/resources/transactions/types/CreateFileUploadAttributes.js +3 -0
  12. package/dist/cjs/api/resources/transactions/types/CreateFileUploadData.d.ts +5 -0
  13. package/dist/cjs/api/resources/transactions/types/CreateFileUploadData.js +3 -0
  14. package/dist/cjs/api/resources/transactions/types/CreateFileUploadRequestBody.d.ts +5 -0
  15. package/dist/cjs/api/resources/transactions/types/CreateFileUploadRequestBody.js +3 -0
  16. package/dist/cjs/api/resources/transactions/types/CreateFileUploadUrlResponse.d.ts +25 -0
  17. package/dist/cjs/api/resources/transactions/types/CreateFileUploadUrlResponse.js +3 -0
  18. package/dist/cjs/api/resources/transactions/types/FileUploadUrlAttributes.d.ts +9 -0
  19. package/dist/cjs/api/resources/transactions/types/FileUploadUrlAttributes.js +3 -0
  20. package/dist/cjs/api/resources/transactions/types/FileUploadUrlData.d.ts +7 -0
  21. package/dist/cjs/api/resources/transactions/types/FileUploadUrlData.js +3 -0
  22. package/dist/cjs/api/resources/transactions/types/index.d.ts +6 -0
  23. package/dist/cjs/api/resources/transactions/types/index.js +6 -0
  24. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.ts +1 -1
  25. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.ts +1 -1
  26. package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.d.ts +1 -0
  27. package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.js +1 -0
  28. package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.d.ts +2 -0
  29. package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.js +2 -0
  30. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlare.d.ts +10 -0
  31. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlare.js +3 -0
  32. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBadge.d.ts +10 -0
  33. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBadge.js +3 -0
  34. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBadgePosition.d.ts +8 -0
  35. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBadgePosition.js +11 -0
  36. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBorderColor.d.ts +6 -0
  37. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlareBorderColor.js +9 -0
  38. package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.d.ts +4 -0
  39. package/dist/cjs/api/resources/users/resources/rewards/types/index.d.ts +4 -0
  40. package/dist/cjs/api/resources/users/resources/rewards/types/index.js +4 -0
  41. package/dist/cjs/version.d.ts +1 -1
  42. package/dist/cjs/version.js +1 -1
  43. package/dist/esm/BaseClient.mjs +2 -2
  44. package/dist/esm/api/resources/commons/errors/index.d.mts +1 -0
  45. package/dist/esm/api/resources/commons/errors/index.mjs +1 -0
  46. package/dist/esm/api/resources/files/index.d.mts +0 -1
  47. package/dist/esm/api/resources/files/index.mjs +0 -1
  48. package/dist/esm/api/resources/index.d.mts +0 -1
  49. package/dist/esm/api/resources/index.mjs +0 -1
  50. package/dist/esm/api/resources/transactions/client/Client.d.mts +34 -0
  51. package/dist/esm/api/resources/transactions/client/Client.mjs +97 -0
  52. package/dist/esm/api/resources/transactions/types/CreateFileUploadAttributes.d.mts +4 -0
  53. package/dist/esm/api/resources/transactions/types/CreateFileUploadAttributes.mjs +2 -0
  54. package/dist/esm/api/resources/transactions/types/CreateFileUploadData.d.mts +5 -0
  55. package/dist/esm/api/resources/transactions/types/CreateFileUploadData.mjs +2 -0
  56. package/dist/esm/api/resources/transactions/types/CreateFileUploadRequestBody.d.mts +5 -0
  57. package/dist/esm/api/resources/transactions/types/CreateFileUploadRequestBody.mjs +2 -0
  58. package/dist/esm/api/resources/transactions/types/CreateFileUploadUrlResponse.d.mts +25 -0
  59. package/dist/esm/api/resources/transactions/types/CreateFileUploadUrlResponse.mjs +2 -0
  60. package/dist/esm/api/resources/transactions/types/FileUploadUrlAttributes.d.mts +9 -0
  61. package/dist/esm/api/resources/transactions/types/FileUploadUrlAttributes.mjs +2 -0
  62. package/dist/esm/api/resources/transactions/types/FileUploadUrlData.d.mts +7 -0
  63. package/dist/esm/api/resources/transactions/types/FileUploadUrlData.mjs +2 -0
  64. package/dist/esm/api/resources/transactions/types/index.d.mts +6 -0
  65. package/dist/esm/api/resources/transactions/types/index.mjs +6 -0
  66. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.mts +1 -1
  67. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.mts +1 -1
  68. package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.d.mts +1 -0
  69. package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.mjs +1 -0
  70. package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.d.mts +2 -0
  71. package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.mjs +2 -0
  72. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlare.d.mts +10 -0
  73. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlare.mjs +2 -0
  74. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBadge.d.mts +10 -0
  75. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBadge.mjs +2 -0
  76. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBadgePosition.d.mts +8 -0
  77. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBadgePosition.mjs +8 -0
  78. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBorderColor.d.mts +6 -0
  79. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlareBorderColor.mjs +6 -0
  80. package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.d.mts +4 -0
  81. package/dist/esm/api/resources/users/resources/rewards/types/index.d.mts +4 -0
  82. package/dist/esm/api/resources/users/resources/rewards/types/index.mjs +4 -0
  83. package/dist/esm/version.d.mts +1 -1
  84. package/dist/esm/version.mjs +1 -1
  85. package/package.json +1 -1
  86. package/reference.md +88 -0
  87. package/dist/cjs/api/resources/files/errors/index.d.ts +0 -1
  88. package/dist/cjs/api/resources/files/errors/index.js +0 -17
  89. package/dist/esm/api/resources/files/errors/index.d.mts +0 -1
  90. package/dist/esm/api/resources/files/errors/index.mjs +0 -1
  91. /package/dist/cjs/api/resources/{files → commons}/errors/ForbiddenError.d.ts +0 -0
  92. /package/dist/cjs/api/resources/{files → commons}/errors/ForbiddenError.js +0 -0
  93. /package/dist/esm/api/resources/{files → commons}/errors/ForbiddenError.d.mts +0 -0
  94. /package/dist/esm/api/resources/{files → commons}/errors/ForbiddenError.mjs +0 -0
@@ -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.6.0",
47
- "User-Agent": "@kard-financial/sdk/4.6.0",
46
+ "X-Fern-SDK-Version": "4.8.0",
47
+ "User-Agent": "@kard-financial/sdk/4.8.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);
@@ -1,5 +1,6 @@
1
1
  export * from "./ConflictError.js";
2
2
  export * from "./DoesNotExistError.js";
3
+ export * from "./ForbiddenError.js";
3
4
  export * from "./InternalServerError.js";
4
5
  export * from "./InvalidRequest.js";
5
6
  export * from "./UnauthorizedError.js";
@@ -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);
@@ -1,3 +1,2 @@
1
1
  export * from "./client/index.js";
2
- export * from "./errors/index.js";
3
2
  export * from "./types/index.js";
@@ -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"));
@@ -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,4 @@
1
+ export interface CreateFileUploadAttributes {
2
+ /** Name of the file to upload, including extension (e.g. "transaction_12345.jsonl") */
3
+ filename: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface CreateFileUploadData {
3
+ type: "incomingTransactionsFile";
4
+ attributes: KardApi.CreateFileUploadAttributes;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface CreateFileUploadRequestBody {
3
+ /** List of file upload requests (1–10 items per request). */
4
+ data: KardApi.CreateFileUploadData[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface FileUploadUrlData {
3
+ type: "incomingTransactionsFile";
4
+ /** Upload session ID for traceability */
5
+ id: string;
6
+ attributes: KardApi.FileUploadUrlAttributes;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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);
@@ -25,6 +25,6 @@ export interface GetLocationsByUserRequest {
25
25
  sort?: KardApi.users.LocationSortOptions | KardApi.users.LocationSortOptions[];
26
26
  /** CSV list of included resources in the response (e.g "offers,categories"). Allowed values are `offers` and `categories`. */
27
27
  include?: string | string[];
28
- /** UI component types to include in included offers. Valid values are shortDescription, longDescription, cta, tags, and detailTags. */
28
+ /** UI component types to include in included offers. */
29
29
  supportedComponents?: KardApi.users.ComponentType | KardApi.users.ComponentType[];
30
30
  }
@@ -18,6 +18,6 @@ export interface GetOffersByUserRequest {
18
18
  sort?: KardApi.users.OfferSortOptions | KardApi.users.OfferSortOptions[];
19
19
  /** CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`. */
20
20
  include?: string | string[];
21
- /** UI component types to include in the response. Valid values are shortDescription, longDescription, cta, tags, and detailTags. */
21
+ /** UI component types to include in the response. */
22
22
  supportedComponents?: KardApi.users.ComponentType | KardApi.users.ComponentType[];
23
23
  }
@@ -1,6 +1,7 @@
1
1
  /** Available button styles for CTA components */
2
2
  export declare const ButtonStyle: {
3
3
  readonly Primary: "PRIMARY";
4
+ readonly Secondary: "SECONDARY";
4
5
  readonly Disabled: "DISABLED";
5
6
  };
6
7
  export type ButtonStyle = (typeof ButtonStyle)[keyof typeof ButtonStyle];
@@ -5,5 +5,6 @@ exports.ButtonStyle = void 0;
5
5
  /** Available button styles for CTA components */
6
6
  exports.ButtonStyle = {
7
7
  Primary: "PRIMARY",
8
+ Secondary: "SECONDARY",
8
9
  Disabled: "DISABLED",
9
10
  };
@@ -3,8 +3,10 @@ export declare const ComponentType: {
3
3
  readonly ShortDescription: "shortDescription";
4
4
  readonly LongDescription: "longDescription";
5
5
  readonly BaseReward: "baseReward";
6
+ readonly BoostedReward: "boostedReward";
6
7
  readonly Cta: "cta";
7
8
  readonly Tags: "tags";
8
9
  readonly DetailTags: "detailTags";
10
+ readonly LogoFlare: "logoFlare";
9
11
  };
10
12
  export type ComponentType = (typeof ComponentType)[keyof typeof ComponentType];
@@ -7,7 +7,9 @@ exports.ComponentType = {
7
7
  ShortDescription: "shortDescription",
8
8
  LongDescription: "longDescription",
9
9
  BaseReward: "baseReward",
10
+ BoostedReward: "boostedReward",
10
11
  Cta: "cta",
11
12
  Tags: "tags",
12
13
  DetailTags: "detailTags",
14
+ LogoFlare: "logoFlare",
13
15
  };
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Logo flare configuration for offer display
4
+ */
5
+ export interface LogoFlare {
6
+ /** Border color style for the logo flare */
7
+ borderColor: KardApi.users.LogoFlareBorderColor;
8
+ /** Optional badge to display on the logo */
9
+ badge?: KardApi.users.LogoFlareBadge;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Badge configuration for logo flare
4
+ */
5
+ export interface LogoFlareBadge {
6
+ /** Icon identifier for the badge */
7
+ icon: string;
8
+ /** Position of the badge on the logo */
9
+ position: KardApi.users.LogoFlareBadgePosition;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /** Available positions for the logo flare badge */
2
+ export declare const LogoFlareBadgePosition: {
3
+ readonly TopRight: "TOP_RIGHT";
4
+ readonly TopLeft: "TOP_LEFT";
5
+ readonly BottomRight: "BOTTOM_RIGHT";
6
+ readonly BottomLeft: "BOTTOM_LEFT";
7
+ };
8
+ export type LogoFlareBadgePosition = (typeof LogoFlareBadgePosition)[keyof typeof LogoFlareBadgePosition];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.LogoFlareBadgePosition = void 0;
5
+ /** Available positions for the logo flare badge */
6
+ exports.LogoFlareBadgePosition = {
7
+ TopRight: "TOP_RIGHT",
8
+ TopLeft: "TOP_LEFT",
9
+ BottomRight: "BOTTOM_RIGHT",
10
+ BottomLeft: "BOTTOM_LEFT",
11
+ };
@@ -0,0 +1,6 @@
1
+ /** Available border color options for logo flare */
2
+ export declare const LogoFlareBorderColor: {
3
+ readonly Primary: "PRIMARY";
4
+ readonly Secondary: "SECONDARY";
5
+ };
6
+ export type LogoFlareBorderColor = (typeof LogoFlareBorderColor)[keyof typeof LogoFlareBorderColor];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.LogoFlareBorderColor = void 0;
5
+ /** Available border color options for logo flare */
6
+ exports.LogoFlareBorderColor = {
7
+ Primary: "PRIMARY",
8
+ Secondary: "SECONDARY",
9
+ };
@@ -9,10 +9,14 @@ export interface OfferComponents {
9
9
  longDescription?: string;
10
10
  /** Formatted reward string */
11
11
  baseReward?: string;
12
+ /** Formatted boosted reward string */
13
+ boostedReward?: string;
12
14
  /** Call-to-action button component */
13
15
  cta?: KardApi.users.CtaComponent;
14
16
  /** Tags for the offer */
15
17
  tags?: string[];
16
18
  /** Detail tags for the offer */
17
19
  detailTags?: string[];
20
+ /** Logo flare configuration for the offer */
21
+ logoFlare?: KardApi.users.LogoFlare;
18
22
  }
@@ -22,6 +22,10 @@ export * from "./LocationData.js";
22
22
  export * from "./LocationRelationships.js";
23
23
  export * from "./LocationSortOptions.js";
24
24
  export * from "./LocationsResponseObject.js";
25
+ export * from "./LogoFlare.js";
26
+ export * from "./LogoFlareBadge.js";
27
+ export * from "./LogoFlareBadgePosition.js";
28
+ export * from "./LogoFlareBorderColor.js";
25
29
  export * from "./OfferCommonFields.js";
26
30
  export * from "./OfferComponents.js";
27
31
  export * from "./OfferDataUnion.js";
@@ -38,6 +38,10 @@ __exportStar(require("./LocationData.js"), exports);
38
38
  __exportStar(require("./LocationRelationships.js"), exports);
39
39
  __exportStar(require("./LocationSortOptions.js"), exports);
40
40
  __exportStar(require("./LocationsResponseObject.js"), exports);
41
+ __exportStar(require("./LogoFlare.js"), exports);
42
+ __exportStar(require("./LogoFlareBadge.js"), exports);
43
+ __exportStar(require("./LogoFlareBadgePosition.js"), exports);
44
+ __exportStar(require("./LogoFlareBorderColor.js"), exports);
41
45
  __exportStar(require("./OfferCommonFields.js"), exports);
42
46
  __exportStar(require("./OfferComponents.js"), exports);
43
47
  __exportStar(require("./OfferDataUnion.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.6.0";
1
+ export declare const SDK_VERSION = "4.8.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.6.0";
4
+ exports.SDK_VERSION = "4.8.0";
@@ -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.6.0",
10
- "User-Agent": "@kard-financial/sdk/4.6.0",
9
+ "X-Fern-SDK-Version": "4.8.0",
10
+ "User-Agent": "@kard-financial/sdk/4.8.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);
@@ -1,5 +1,6 @@
1
1
  export * from "./ConflictError.mjs";
2
2
  export * from "./DoesNotExistError.mjs";
3
+ export * from "./ForbiddenError.mjs";
3
4
  export * from "./InternalServerError.mjs";
4
5
  export * from "./InvalidRequest.mjs";
5
6
  export * from "./UnauthorizedError.mjs";
@@ -1,5 +1,6 @@
1
1
  export * from "./ConflictError.mjs";
2
2
  export * from "./DoesNotExistError.mjs";
3
+ export * from "./ForbiddenError.mjs";
3
4
  export * from "./InternalServerError.mjs";
4
5
  export * from "./InvalidRequest.mjs";
5
6
  export * from "./UnauthorizedError.mjs";
@@ -1,3 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
- export * from "./errors/index.mjs";
3
2
  export * from "./types/index.mjs";
@@ -1,3 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
- export * from "./errors/index.mjs";
3
2
  export * from "./types/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";
@@ -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";
@@ -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/>