@kard-financial/sdk 31.2.0 → 31.3.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 (25) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/notifications/types/EarnedRewardApprovedData.d.ts +1 -1
  3. package/dist/cjs/api/resources/notifications/types/EarnedRewardNotificationAttributes.d.ts +15 -0
  4. package/dist/cjs/api/resources/notifications/types/EarnedRewardNotificationAttributes.js +3 -0
  5. package/dist/cjs/api/resources/notifications/types/EarnedRewardSettledAttributes.d.ts +1 -1
  6. package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +22 -2
  7. package/dist/cjs/api/resources/notifications/types/UserReward.d.ts +7 -0
  8. package/dist/cjs/api/resources/notifications/types/UserReward.js +3 -0
  9. package/dist/cjs/api/resources/notifications/types/index.d.ts +2 -0
  10. package/dist/cjs/api/resources/notifications/types/index.js +2 -0
  11. package/dist/cjs/version.d.ts +1 -1
  12. package/dist/cjs/version.js +1 -1
  13. package/dist/esm/BaseClient.mjs +2 -2
  14. package/dist/esm/api/resources/notifications/types/EarnedRewardApprovedData.d.mts +1 -1
  15. package/dist/esm/api/resources/notifications/types/EarnedRewardNotificationAttributes.d.mts +15 -0
  16. package/dist/esm/api/resources/notifications/types/EarnedRewardNotificationAttributes.mjs +2 -0
  17. package/dist/esm/api/resources/notifications/types/EarnedRewardSettledAttributes.d.mts +1 -1
  18. package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +22 -2
  19. package/dist/esm/api/resources/notifications/types/UserReward.d.mts +7 -0
  20. package/dist/esm/api/resources/notifications/types/UserReward.mjs +2 -0
  21. package/dist/esm/api/resources/notifications/types/index.d.mts +2 -0
  22. package/dist/esm/api/resources/notifications/types/index.mjs +2 -0
  23. package/dist/esm/version.d.mts +1 -1
  24. package/dist/esm/version.mjs +1 -1
  25. package/package.json +1 -1
@@ -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": "31.2.0",
47
- "User-Agent": "@kard-financial/sdk/31.2.0",
46
+ "X-Fern-SDK-Version": "31.3.0",
47
+ "User-Agent": "@kard-financial/sdk/31.3.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);
@@ -2,6 +2,6 @@ import type * as KardApi from "../../../index.js";
2
2
  export interface EarnedRewardApprovedData {
3
3
  /** The internal ID of the notification */
4
4
  id: string;
5
- attributes: KardApi.RewardNotificationAttributes;
5
+ attributes: KardApi.EarnedRewardNotificationAttributes;
6
6
  relationships: KardApi.EarnedRewardRelationships;
7
7
  }
@@ -0,0 +1,15 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface EarnedRewardNotificationAttributes extends KardApi.RewardNotificationAttributes {
3
+ /** The category of the offer, e.g. "Food & Dining" */
4
+ categoryName?: string | undefined;
5
+ /** Type of commission on offer (% or a flat $) */
6
+ userReward?: KardApi.UserReward | undefined;
7
+ /**
8
+ * Tracked asset images for the merchant. The asset
9
+ * URL is signed for attribution tracking and should be loaded as-is by the
10
+ * client.
11
+ */
12
+ assets?: KardApi.MerchantAsset[] | undefined;
13
+ /** The purchase channels the offer applies to */
14
+ purchaseChannel?: KardApi.PurchaseChannel[] | undefined;
15
+ }
@@ -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 });
@@ -1,4 +1,4 @@
1
1
  import type * as KardApi from "../../../index.js";
2
- export interface EarnedRewardSettledAttributes extends KardApi.RewardNotificationAttributes {
2
+ export interface EarnedRewardSettledAttributes extends KardApi.EarnedRewardNotificationAttributes {
3
3
  commissionEarned: KardApi.CommissionValue;
4
4
  }
@@ -17,7 +17,17 @@ import type * as KardApi from "../../../index.js";
17
17
  * cardProductId: "card_product_123",
18
18
  * transactionTimestamp: "2024-10-01T14:32:10.000Z",
19
19
  * transactionId: "019df940-babd-7cd3-acfc-a96de16643e9",
20
- * transactionAmountInCents: 3000
20
+ * transactionAmountInCents: 3000,
21
+ * categoryName: "Food & Dining",
22
+ * userReward: {
23
+ * type: KardApi.CommissionType.Percent,
24
+ * value: 5.7
25
+ * },
26
+ * assets: [{
27
+ * type: KardApi.MerchantAssetType.ImgView,
28
+ * url: "https://cdn.getkard.com/merchants/mcdonalds.png"
29
+ * }],
30
+ * purchaseChannel: [KardApi.PurchaseChannel.Online, KardApi.PurchaseChannel.Instore]
21
31
  * },
22
32
  * relationships: {
23
33
  * user: {
@@ -55,7 +65,17 @@ import type * as KardApi from "../../../index.js";
55
65
  * cardProductId: "card_product_123",
56
66
  * transactionTimestamp: "2024-10-01T14:32:10.000Z",
57
67
  * transactionId: "019df940-babd-7cd3-acfc-a96de16643e9",
58
- * transactionAmountInCents: 3000
68
+ * transactionAmountInCents: 3000,
69
+ * categoryName: "Food & Dining",
70
+ * userReward: {
71
+ * type: KardApi.CommissionType.Percent,
72
+ * value: 5.7
73
+ * },
74
+ * assets: [{
75
+ * type: KardApi.MerchantAssetType.ImgView,
76
+ * url: "https://cdn.getkard.com/merchants/mcdonalds.png"
77
+ * }],
78
+ * purchaseChannel: [KardApi.PurchaseChannel.Online, KardApi.PurchaseChannel.Instore]
59
79
  * },
60
80
  * relationships: {
61
81
  * user: {
@@ -0,0 +1,7 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface UserReward {
3
+ /** The type of reward (% or a flat $) */
4
+ type: KardApi.CommissionType;
5
+ /** The reward value */
6
+ value: number;
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 });
@@ -3,6 +3,7 @@ export * from "./AuditUpdateData.js";
3
3
  export * from "./AuditUpdateRelationships.js";
4
4
  export * from "./ClawbackData.js";
5
5
  export * from "./EarnedRewardApprovedData.js";
6
+ export * from "./EarnedRewardNotificationAttributes.js";
6
7
  export * from "./EarnedRewardRejectedAttributes.js";
7
8
  export * from "./EarnedRewardRejectedData.js";
8
9
  export * from "./EarnedRewardRelationships.js";
@@ -24,6 +25,7 @@ export * from "./PushNotificationPlacementFileRelationships.js";
24
25
  export * from "./RejectedTransactionRelationships.js";
25
26
  export * from "./RewardNotificationAttributes.js";
26
27
  export * from "./TransactionRelationships.js";
28
+ export * from "./UserReward.js";
27
29
  export * from "./ValidTransactionAttributes.js";
28
30
  export * from "./ValidTransactionCommissionEarned.js";
29
31
  export * from "./ValidTransactionData.js";
@@ -19,6 +19,7 @@ __exportStar(require("./AuditUpdateData.js"), exports);
19
19
  __exportStar(require("./AuditUpdateRelationships.js"), exports);
20
20
  __exportStar(require("./ClawbackData.js"), exports);
21
21
  __exportStar(require("./EarnedRewardApprovedData.js"), exports);
22
+ __exportStar(require("./EarnedRewardNotificationAttributes.js"), exports);
22
23
  __exportStar(require("./EarnedRewardRejectedAttributes.js"), exports);
23
24
  __exportStar(require("./EarnedRewardRejectedData.js"), exports);
24
25
  __exportStar(require("./EarnedRewardRelationships.js"), exports);
@@ -40,6 +41,7 @@ __exportStar(require("./PushNotificationPlacementFileRelationships.js"), exports
40
41
  __exportStar(require("./RejectedTransactionRelationships.js"), exports);
41
42
  __exportStar(require("./RewardNotificationAttributes.js"), exports);
42
43
  __exportStar(require("./TransactionRelationships.js"), exports);
44
+ __exportStar(require("./UserReward.js"), exports);
43
45
  __exportStar(require("./ValidTransactionAttributes.js"), exports);
44
46
  __exportStar(require("./ValidTransactionCommissionEarned.js"), exports);
45
47
  __exportStar(require("./ValidTransactionData.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "31.2.0";
1
+ export declare const SDK_VERSION = "31.3.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 = "31.2.0";
4
+ exports.SDK_VERSION = "31.3.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": "31.2.0",
10
- "User-Agent": "@kard-financial/sdk/31.2.0",
9
+ "X-Fern-SDK-Version": "31.3.0",
10
+ "User-Agent": "@kard-financial/sdk/31.3.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);
@@ -2,6 +2,6 @@ import type * as KardApi from "../../../index.mjs";
2
2
  export interface EarnedRewardApprovedData {
3
3
  /** The internal ID of the notification */
4
4
  id: string;
5
- attributes: KardApi.RewardNotificationAttributes;
5
+ attributes: KardApi.EarnedRewardNotificationAttributes;
6
6
  relationships: KardApi.EarnedRewardRelationships;
7
7
  }
@@ -0,0 +1,15 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export interface EarnedRewardNotificationAttributes extends KardApi.RewardNotificationAttributes {
3
+ /** The category of the offer, e.g. "Food & Dining" */
4
+ categoryName?: string | undefined;
5
+ /** Type of commission on offer (% or a flat $) */
6
+ userReward?: KardApi.UserReward | undefined;
7
+ /**
8
+ * Tracked asset images for the merchant. The asset
9
+ * URL is signed for attribution tracking and should be loaded as-is by the
10
+ * client.
11
+ */
12
+ assets?: KardApi.MerchantAsset[] | undefined;
13
+ /** The purchase channels the offer applies to */
14
+ purchaseChannel?: KardApi.PurchaseChannel[] | undefined;
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,4 @@
1
1
  import type * as KardApi from "../../../index.mjs";
2
- export interface EarnedRewardSettledAttributes extends KardApi.RewardNotificationAttributes {
2
+ export interface EarnedRewardSettledAttributes extends KardApi.EarnedRewardNotificationAttributes {
3
3
  commissionEarned: KardApi.CommissionValue;
4
4
  }
@@ -17,7 +17,17 @@ import type * as KardApi from "../../../index.mjs";
17
17
  * cardProductId: "card_product_123",
18
18
  * transactionTimestamp: "2024-10-01T14:32:10.000Z",
19
19
  * transactionId: "019df940-babd-7cd3-acfc-a96de16643e9",
20
- * transactionAmountInCents: 3000
20
+ * transactionAmountInCents: 3000,
21
+ * categoryName: "Food & Dining",
22
+ * userReward: {
23
+ * type: KardApi.CommissionType.Percent,
24
+ * value: 5.7
25
+ * },
26
+ * assets: [{
27
+ * type: KardApi.MerchantAssetType.ImgView,
28
+ * url: "https://cdn.getkard.com/merchants/mcdonalds.png"
29
+ * }],
30
+ * purchaseChannel: [KardApi.PurchaseChannel.Online, KardApi.PurchaseChannel.Instore]
21
31
  * },
22
32
  * relationships: {
23
33
  * user: {
@@ -55,7 +65,17 @@ import type * as KardApi from "../../../index.mjs";
55
65
  * cardProductId: "card_product_123",
56
66
  * transactionTimestamp: "2024-10-01T14:32:10.000Z",
57
67
  * transactionId: "019df940-babd-7cd3-acfc-a96de16643e9",
58
- * transactionAmountInCents: 3000
68
+ * transactionAmountInCents: 3000,
69
+ * categoryName: "Food & Dining",
70
+ * userReward: {
71
+ * type: KardApi.CommissionType.Percent,
72
+ * value: 5.7
73
+ * },
74
+ * assets: [{
75
+ * type: KardApi.MerchantAssetType.ImgView,
76
+ * url: "https://cdn.getkard.com/merchants/mcdonalds.png"
77
+ * }],
78
+ * purchaseChannel: [KardApi.PurchaseChannel.Online, KardApi.PurchaseChannel.Instore]
59
79
  * },
60
80
  * relationships: {
61
81
  * user: {
@@ -0,0 +1,7 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export interface UserReward {
3
+ /** The type of reward (% or a flat $) */
4
+ type: KardApi.CommissionType;
5
+ /** The reward value */
6
+ value: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -3,6 +3,7 @@ export * from "./AuditUpdateData.mjs";
3
3
  export * from "./AuditUpdateRelationships.mjs";
4
4
  export * from "./ClawbackData.mjs";
5
5
  export * from "./EarnedRewardApprovedData.mjs";
6
+ export * from "./EarnedRewardNotificationAttributes.mjs";
6
7
  export * from "./EarnedRewardRejectedAttributes.mjs";
7
8
  export * from "./EarnedRewardRejectedData.mjs";
8
9
  export * from "./EarnedRewardRelationships.mjs";
@@ -24,6 +25,7 @@ export * from "./PushNotificationPlacementFileRelationships.mjs";
24
25
  export * from "./RejectedTransactionRelationships.mjs";
25
26
  export * from "./RewardNotificationAttributes.mjs";
26
27
  export * from "./TransactionRelationships.mjs";
28
+ export * from "./UserReward.mjs";
27
29
  export * from "./ValidTransactionAttributes.mjs";
28
30
  export * from "./ValidTransactionCommissionEarned.mjs";
29
31
  export * from "./ValidTransactionData.mjs";
@@ -3,6 +3,7 @@ export * from "./AuditUpdateData.mjs";
3
3
  export * from "./AuditUpdateRelationships.mjs";
4
4
  export * from "./ClawbackData.mjs";
5
5
  export * from "./EarnedRewardApprovedData.mjs";
6
+ export * from "./EarnedRewardNotificationAttributes.mjs";
6
7
  export * from "./EarnedRewardRejectedAttributes.mjs";
7
8
  export * from "./EarnedRewardRejectedData.mjs";
8
9
  export * from "./EarnedRewardRelationships.mjs";
@@ -24,6 +25,7 @@ export * from "./PushNotificationPlacementFileRelationships.mjs";
24
25
  export * from "./RejectedTransactionRelationships.mjs";
25
26
  export * from "./RewardNotificationAttributes.mjs";
26
27
  export * from "./TransactionRelationships.mjs";
28
+ export * from "./UserReward.mjs";
27
29
  export * from "./ValidTransactionAttributes.mjs";
28
30
  export * from "./ValidTransactionCommissionEarned.mjs";
29
31
  export * from "./ValidTransactionData.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "31.2.0";
1
+ export declare const SDK_VERSION = "31.3.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "31.2.0";
1
+ export const SDK_VERSION = "31.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "31.2.0",
3
+ "version": "31.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",