@kard-financial/sdk 31.2.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/notifications/types/EarnedRewardApprovedData.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/types/EarnedRewardNotificationAttributes.d.ts +15 -0
- package/dist/cjs/api/resources/notifications/types/EarnedRewardNotificationAttributes.js +3 -0
- package/dist/cjs/api/resources/notifications/types/EarnedRewardSettledAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +22 -2
- package/dist/cjs/api/resources/notifications/types/UserReward.d.ts +7 -0
- package/dist/cjs/api/resources/notifications/types/UserReward.js +3 -0
- package/dist/cjs/api/resources/notifications/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/notifications/types/index.js +2 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/client/Client.js +4 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/ContentStrategyAttributes.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/ContentStrategyFilters.d.ts +14 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/ContentStrategyFilters.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/ContentStrategyResponse.d.ts +3 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/CreateContentStrategyAttributes.d.ts +5 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/CreateContentStrategyRequestBody.d.ts +3 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.d.ts +5 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.js +8 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/UpdateContentStrategyAttributes.d.ts +5 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/index.js +2 -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/notifications/types/EarnedRewardApprovedData.d.mts +1 -1
- package/dist/esm/api/resources/notifications/types/EarnedRewardNotificationAttributes.d.mts +15 -0
- package/dist/esm/api/resources/notifications/types/EarnedRewardNotificationAttributes.mjs +2 -0
- package/dist/esm/api/resources/notifications/types/EarnedRewardSettledAttributes.d.mts +1 -1
- package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +22 -2
- package/dist/esm/api/resources/notifications/types/UserReward.d.mts +7 -0
- package/dist/esm/api/resources/notifications/types/UserReward.mjs +2 -0
- package/dist/esm/api/resources/notifications/types/index.d.mts +2 -0
- package/dist/esm/api/resources/notifications/types/index.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/client/Client.mjs +4 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/ContentStrategyAttributes.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/ContentStrategyFilters.d.mts +14 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/ContentStrategyFilters.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/ContentStrategyResponse.d.mts +3 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/CreateContentStrategyAttributes.d.mts +5 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/CreateContentStrategyRequestBody.d.mts +3 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.d.mts +5 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.mjs +5 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/UpdateContentStrategyAttributes.d.mts +5 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/index.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/contentStrategies/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +4 -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": "
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/
|
|
46
|
+
"X-Fern-SDK-Version": "32.0.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/32.0.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.
|
|
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
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.js";
|
|
2
|
-
export interface EarnedRewardSettledAttributes extends KardApi.
|
|
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: {
|
|
@@ -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);
|
|
@@ -31,6 +31,9 @@ export declare class ContentStrategiesClient {
|
|
|
31
31
|
* attributes: {
|
|
32
32
|
* name: "Featured Travel",
|
|
33
33
|
* sort: "HIGHEST_CASHBACK",
|
|
34
|
+
* filters: {
|
|
35
|
+
* offerFeatures: ["INTERACTIVE"]
|
|
36
|
+
* },
|
|
34
37
|
* categories: ["Travel"],
|
|
35
38
|
* categoryExclusions: ["Gas"],
|
|
36
39
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -96,6 +99,7 @@ export declare class ContentStrategiesClient {
|
|
|
96
99
|
* type: "contentStrategy",
|
|
97
100
|
* attributes: {
|
|
98
101
|
* name: "name",
|
|
102
|
+
* filters: {},
|
|
99
103
|
* categories: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
100
104
|
* categoryExclusions: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
101
105
|
* merchantExclusions: ["merchantExclusions", "merchantExclusions"]
|
|
@@ -76,6 +76,9 @@ class ContentStrategiesClient {
|
|
|
76
76
|
* attributes: {
|
|
77
77
|
* name: "Featured Travel",
|
|
78
78
|
* sort: "HIGHEST_CASHBACK",
|
|
79
|
+
* filters: {
|
|
80
|
+
* offerFeatures: ["INTERACTIVE"]
|
|
81
|
+
* },
|
|
79
82
|
* categories: ["Travel"],
|
|
80
83
|
* categoryExclusions: ["Gas"],
|
|
81
84
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -288,6 +291,7 @@ class ContentStrategiesClient {
|
|
|
288
291
|
* type: "contentStrategy",
|
|
289
292
|
* attributes: {
|
|
290
293
|
* name: "name",
|
|
294
|
+
* filters: {},
|
|
291
295
|
* categories: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
292
296
|
* categoryExclusions: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
293
297
|
* merchantExclusions: ["merchantExclusions", "merchantExclusions"]
|
|
@@ -9,6 +9,8 @@ export interface ContentStrategyAttributes {
|
|
|
9
9
|
organizationId: string;
|
|
10
10
|
/** Sort applied when selecting offers for the strategy */
|
|
11
11
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
12
|
+
/** Filters applied when selecting offers for the strategy */
|
|
13
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
12
14
|
/** Merchant categories to include */
|
|
13
15
|
categories: KardApi.CategoryOption[];
|
|
14
16
|
/** Merchant categories to exclude */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Filters applied when selecting offers for a content strategy
|
|
4
|
+
*/
|
|
5
|
+
export interface ContentStrategyFilters {
|
|
6
|
+
/** Merchant categories to include */
|
|
7
|
+
categories?: string[] | undefined;
|
|
8
|
+
/** Merchant categories to exclude */
|
|
9
|
+
categoryExclusions?: string[] | undefined;
|
|
10
|
+
/** Merchant IDs to exclude */
|
|
11
|
+
merchantExclusions?: string[] | undefined;
|
|
12
|
+
/** Offer features to filter by */
|
|
13
|
+
offerFeatures?: KardApi.organizations.OfferFeatures[] | undefined;
|
|
14
|
+
}
|
|
@@ -10,6 +10,9 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
10
10
|
* name: "Featured Travel",
|
|
11
11
|
* organizationId: "org-123",
|
|
12
12
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
13
|
+
* filters: {
|
|
14
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
15
|
+
* },
|
|
13
16
|
* categories: [KardApi.CategoryOption.Travel],
|
|
14
17
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
15
18
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -6,6 +6,9 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
6
6
|
* {
|
|
7
7
|
* name: "Featured Travel",
|
|
8
8
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
9
|
+
* filters: {
|
|
10
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
11
|
+
* },
|
|
9
12
|
* categories: [KardApi.CategoryOption.Travel],
|
|
10
13
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
11
14
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -16,6 +19,8 @@ export interface CreateContentStrategyAttributes {
|
|
|
16
19
|
name: string;
|
|
17
20
|
/** Sort applied when selecting offers for the strategy */
|
|
18
21
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
22
|
+
/** Filters applied when selecting offers for the strategy */
|
|
23
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
19
24
|
/** Merchant categories to include */
|
|
20
25
|
categories: KardApi.CategoryOption[];
|
|
21
26
|
/** Merchant categories to exclude */
|
|
@@ -9,6 +9,9 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
9
9
|
* attributes: {
|
|
10
10
|
* name: "Featured Travel",
|
|
11
11
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
12
|
+
* filters: {
|
|
13
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
14
|
+
* },
|
|
12
15
|
* categories: [KardApi.CategoryOption.Travel],
|
|
13
16
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
14
17
|
* merchantExclusions: ["merchant-abc"]
|
package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Offer feature applied to the offers selected by a content strategy. A strategy may have any number of offer features. */
|
|
2
|
+
export declare const OfferFeatures: {
|
|
3
|
+
readonly Interactive: "INTERACTIVE";
|
|
4
|
+
};
|
|
5
|
+
export type OfferFeatures = (typeof OfferFeatures)[keyof typeof OfferFeatures];
|
package/dist/cjs/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OfferFeatures = void 0;
|
|
5
|
+
/** Offer feature applied to the offers selected by a content strategy. A strategy may have any number of offer features. */
|
|
6
|
+
exports.OfferFeatures = {
|
|
7
|
+
Interactive: "INTERACTIVE",
|
|
8
|
+
};
|
|
@@ -6,6 +6,9 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
6
6
|
* {
|
|
7
7
|
* name: "Updated Travel Strategy",
|
|
8
8
|
* sort: KardApi.organizations.ContentStrategySort.ExpiringSoon,
|
|
9
|
+
* filters: {
|
|
10
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
11
|
+
* },
|
|
9
12
|
* categories: [KardApi.CategoryOption.Travel, KardApi.CategoryOption.FoodBeverage],
|
|
10
13
|
* categoryExclusions: [],
|
|
11
14
|
* merchantExclusions: ["merchant-xyz"]
|
|
@@ -16,6 +19,8 @@ export interface UpdateContentStrategyAttributes {
|
|
|
16
19
|
name: string;
|
|
17
20
|
/** Sort applied when selecting offers for the strategy */
|
|
18
21
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
22
|
+
/** Filters applied when selecting offers for the strategy */
|
|
23
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
19
24
|
/** Merchant categories to include */
|
|
20
25
|
categories: KardApi.CategoryOption[];
|
|
21
26
|
/** Merchant categories to exclude */
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from "./ContentStrategyAttributes.js";
|
|
2
|
+
export * from "./ContentStrategyFilters.js";
|
|
2
3
|
export * from "./ContentStrategyListResponse.js";
|
|
3
4
|
export * from "./ContentStrategyResponse.js";
|
|
4
5
|
export * from "./ContentStrategySort.js";
|
|
5
6
|
export * from "./CreateContentStrategyAttributes.js";
|
|
6
7
|
export * from "./CreateContentStrategyRequestBody.js";
|
|
7
8
|
export * from "./CreateContentStrategyRequestData.js";
|
|
9
|
+
export * from "./OfferFeatures.js";
|
|
8
10
|
export * from "./UpdateContentStrategyAttributes.js";
|
|
9
11
|
export * from "./UpdateContentStrategyRequestBody.js";
|
|
10
12
|
export * from "./UpdateContentStrategyRequestData.js";
|
|
@@ -15,12 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ContentStrategyAttributes.js"), exports);
|
|
18
|
+
__exportStar(require("./ContentStrategyFilters.js"), exports);
|
|
18
19
|
__exportStar(require("./ContentStrategyListResponse.js"), exports);
|
|
19
20
|
__exportStar(require("./ContentStrategyResponse.js"), exports);
|
|
20
21
|
__exportStar(require("./ContentStrategySort.js"), exports);
|
|
21
22
|
__exportStar(require("./CreateContentStrategyAttributes.js"), exports);
|
|
22
23
|
__exportStar(require("./CreateContentStrategyRequestBody.js"), exports);
|
|
23
24
|
__exportStar(require("./CreateContentStrategyRequestData.js"), exports);
|
|
25
|
+
__exportStar(require("./OfferFeatures.js"), exports);
|
|
24
26
|
__exportStar(require("./UpdateContentStrategyAttributes.js"), exports);
|
|
25
27
|
__exportStar(require("./UpdateContentStrategyRequestBody.js"), exports);
|
|
26
28
|
__exportStar(require("./UpdateContentStrategyRequestData.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "32.0.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": "
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/
|
|
9
|
+
"X-Fern-SDK-Version": "32.0.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/32.0.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.
|
|
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
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.mjs";
|
|
2
|
-
export interface EarnedRewardSettledAttributes extends KardApi.
|
|
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: {
|
|
@@ -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";
|
package/dist/esm/api/resources/organizations/resources/contentStrategies/client/Client.d.mts
CHANGED
|
@@ -31,6 +31,9 @@ export declare class ContentStrategiesClient {
|
|
|
31
31
|
* attributes: {
|
|
32
32
|
* name: "Featured Travel",
|
|
33
33
|
* sort: "HIGHEST_CASHBACK",
|
|
34
|
+
* filters: {
|
|
35
|
+
* offerFeatures: ["INTERACTIVE"]
|
|
36
|
+
* },
|
|
34
37
|
* categories: ["Travel"],
|
|
35
38
|
* categoryExclusions: ["Gas"],
|
|
36
39
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -96,6 +99,7 @@ export declare class ContentStrategiesClient {
|
|
|
96
99
|
* type: "contentStrategy",
|
|
97
100
|
* attributes: {
|
|
98
101
|
* name: "name",
|
|
102
|
+
* filters: {},
|
|
99
103
|
* categories: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
100
104
|
* categoryExclusions: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
101
105
|
* merchantExclusions: ["merchantExclusions", "merchantExclusions"]
|
|
@@ -40,6 +40,9 @@ export class ContentStrategiesClient {
|
|
|
40
40
|
* attributes: {
|
|
41
41
|
* name: "Featured Travel",
|
|
42
42
|
* sort: "HIGHEST_CASHBACK",
|
|
43
|
+
* filters: {
|
|
44
|
+
* offerFeatures: ["INTERACTIVE"]
|
|
45
|
+
* },
|
|
43
46
|
* categories: ["Travel"],
|
|
44
47
|
* categoryExclusions: ["Gas"],
|
|
45
48
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -252,6 +255,7 @@ export class ContentStrategiesClient {
|
|
|
252
255
|
* type: "contentStrategy",
|
|
253
256
|
* attributes: {
|
|
254
257
|
* name: "name",
|
|
258
|
+
* filters: {},
|
|
255
259
|
* categories: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
256
260
|
* categoryExclusions: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
257
261
|
* merchantExclusions: ["merchantExclusions", "merchantExclusions"]
|
|
@@ -9,6 +9,8 @@ export interface ContentStrategyAttributes {
|
|
|
9
9
|
organizationId: string;
|
|
10
10
|
/** Sort applied when selecting offers for the strategy */
|
|
11
11
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
12
|
+
/** Filters applied when selecting offers for the strategy */
|
|
13
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
12
14
|
/** Merchant categories to include */
|
|
13
15
|
categories: KardApi.CategoryOption[];
|
|
14
16
|
/** Merchant categories to exclude */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Filters applied when selecting offers for a content strategy
|
|
4
|
+
*/
|
|
5
|
+
export interface ContentStrategyFilters {
|
|
6
|
+
/** Merchant categories to include */
|
|
7
|
+
categories?: string[] | undefined;
|
|
8
|
+
/** Merchant categories to exclude */
|
|
9
|
+
categoryExclusions?: string[] | undefined;
|
|
10
|
+
/** Merchant IDs to exclude */
|
|
11
|
+
merchantExclusions?: string[] | undefined;
|
|
12
|
+
/** Offer features to filter by */
|
|
13
|
+
offerFeatures?: KardApi.organizations.OfferFeatures[] | undefined;
|
|
14
|
+
}
|
|
@@ -10,6 +10,9 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
10
10
|
* name: "Featured Travel",
|
|
11
11
|
* organizationId: "org-123",
|
|
12
12
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
13
|
+
* filters: {
|
|
14
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
15
|
+
* },
|
|
13
16
|
* categories: [KardApi.CategoryOption.Travel],
|
|
14
17
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
15
18
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -6,6 +6,9 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
6
6
|
* {
|
|
7
7
|
* name: "Featured Travel",
|
|
8
8
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
9
|
+
* filters: {
|
|
10
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
11
|
+
* },
|
|
9
12
|
* categories: [KardApi.CategoryOption.Travel],
|
|
10
13
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
11
14
|
* merchantExclusions: ["merchant-abc"]
|
|
@@ -16,6 +19,8 @@ export interface CreateContentStrategyAttributes {
|
|
|
16
19
|
name: string;
|
|
17
20
|
/** Sort applied when selecting offers for the strategy */
|
|
18
21
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
22
|
+
/** Filters applied when selecting offers for the strategy */
|
|
23
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
19
24
|
/** Merchant categories to include */
|
|
20
25
|
categories: KardApi.CategoryOption[];
|
|
21
26
|
/** Merchant categories to exclude */
|
|
@@ -9,6 +9,9 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
9
9
|
* attributes: {
|
|
10
10
|
* name: "Featured Travel",
|
|
11
11
|
* sort: KardApi.organizations.ContentStrategySort.HighestCashback,
|
|
12
|
+
* filters: {
|
|
13
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
14
|
+
* },
|
|
12
15
|
* categories: [KardApi.CategoryOption.Travel],
|
|
13
16
|
* categoryExclusions: [KardApi.CategoryOption.Gas],
|
|
14
17
|
* merchantExclusions: ["merchant-abc"]
|
package/dist/esm/api/resources/organizations/resources/contentStrategies/types/OfferFeatures.d.mts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Offer feature applied to the offers selected by a content strategy. A strategy may have any number of offer features. */
|
|
2
|
+
export declare const OfferFeatures: {
|
|
3
|
+
readonly Interactive: "INTERACTIVE";
|
|
4
|
+
};
|
|
5
|
+
export type OfferFeatures = (typeof OfferFeatures)[keyof typeof OfferFeatures];
|
|
@@ -6,6 +6,9 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
6
6
|
* {
|
|
7
7
|
* name: "Updated Travel Strategy",
|
|
8
8
|
* sort: KardApi.organizations.ContentStrategySort.ExpiringSoon,
|
|
9
|
+
* filters: {
|
|
10
|
+
* offerFeatures: [KardApi.organizations.OfferFeatures.Interactive]
|
|
11
|
+
* },
|
|
9
12
|
* categories: [KardApi.CategoryOption.Travel, KardApi.CategoryOption.FoodBeverage],
|
|
10
13
|
* categoryExclusions: [],
|
|
11
14
|
* merchantExclusions: ["merchant-xyz"]
|
|
@@ -16,6 +19,8 @@ export interface UpdateContentStrategyAttributes {
|
|
|
16
19
|
name: string;
|
|
17
20
|
/** Sort applied when selecting offers for the strategy */
|
|
18
21
|
sort?: KardApi.organizations.ContentStrategySort | undefined;
|
|
22
|
+
/** Filters applied when selecting offers for the strategy */
|
|
23
|
+
filters: KardApi.organizations.ContentStrategyFilters;
|
|
19
24
|
/** Merchant categories to include */
|
|
20
25
|
categories: KardApi.CategoryOption[];
|
|
21
26
|
/** Merchant categories to exclude */
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from "./ContentStrategyAttributes.mjs";
|
|
2
|
+
export * from "./ContentStrategyFilters.mjs";
|
|
2
3
|
export * from "./ContentStrategyListResponse.mjs";
|
|
3
4
|
export * from "./ContentStrategyResponse.mjs";
|
|
4
5
|
export * from "./ContentStrategySort.mjs";
|
|
5
6
|
export * from "./CreateContentStrategyAttributes.mjs";
|
|
6
7
|
export * from "./CreateContentStrategyRequestBody.mjs";
|
|
7
8
|
export * from "./CreateContentStrategyRequestData.mjs";
|
|
9
|
+
export * from "./OfferFeatures.mjs";
|
|
8
10
|
export * from "./UpdateContentStrategyAttributes.mjs";
|
|
9
11
|
export * from "./UpdateContentStrategyRequestBody.mjs";
|
|
10
12
|
export * from "./UpdateContentStrategyRequestData.mjs";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from "./ContentStrategyAttributes.mjs";
|
|
2
|
+
export * from "./ContentStrategyFilters.mjs";
|
|
2
3
|
export * from "./ContentStrategyListResponse.mjs";
|
|
3
4
|
export * from "./ContentStrategyResponse.mjs";
|
|
4
5
|
export * from "./ContentStrategySort.mjs";
|
|
5
6
|
export * from "./CreateContentStrategyAttributes.mjs";
|
|
6
7
|
export * from "./CreateContentStrategyRequestBody.mjs";
|
|
7
8
|
export * from "./CreateContentStrategyRequestData.mjs";
|
|
9
|
+
export * from "./OfferFeatures.mjs";
|
|
8
10
|
export * from "./UpdateContentStrategyAttributes.mjs";
|
|
9
11
|
export * from "./UpdateContentStrategyRequestBody.mjs";
|
|
10
12
|
export * from "./UpdateContentStrategyRequestData.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "32.0.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "32.0.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -842,6 +842,9 @@ await client.organizations.contentStrategies.create("org-123", {
|
|
|
842
842
|
attributes: {
|
|
843
843
|
name: "Featured Travel",
|
|
844
844
|
sort: "HIGHEST_CASHBACK",
|
|
845
|
+
filters: {
|
|
846
|
+
offerFeatures: ["INTERACTIVE"]
|
|
847
|
+
},
|
|
845
848
|
categories: ["Travel"],
|
|
846
849
|
categoryExclusions: ["Gas"],
|
|
847
850
|
merchantExclusions: ["merchant-abc"]
|
|
@@ -1065,6 +1068,7 @@ await client.organizations.contentStrategies.update("organizationId", "contentSt
|
|
|
1065
1068
|
type: "contentStrategy",
|
|
1066
1069
|
attributes: {
|
|
1067
1070
|
name: "name",
|
|
1071
|
+
filters: {},
|
|
1068
1072
|
categories: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
1069
1073
|
categoryExclusions: ["Arts & Entertainment", "Arts & Entertainment"],
|
|
1070
1074
|
merchantExclusions: ["merchantExclusions", "merchantExclusions"]
|