@kard-financial/sdk 12.2.0 → 12.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/{transactions → commons}/types/CardNetwork.d.ts +1 -0
- package/dist/cjs/api/resources/{transactions → commons}/types/CardNetwork.js +1 -0
- package/dist/cjs/api/resources/commons/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/commons/types/index.js +1 -0
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/transactions/client/Client.js +6 -2
- package/dist/cjs/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.ts +4 -1
- package/dist/cjs/api/resources/transactions/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/transactions/types/index.js +0 -1
- 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/{transactions → commons}/types/CardNetwork.d.mts +1 -0
- package/dist/esm/api/resources/{transactions → commons}/types/CardNetwork.mjs +1 -0
- package/dist/esm/api/resources/commons/types/index.d.mts +1 -0
- package/dist/esm/api/resources/commons/types/index.mjs +1 -0
- package/dist/esm/api/resources/transactions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/transactions/client/Client.mjs +6 -2
- package/dist/esm/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.mts +4 -1
- package/dist/esm/api/resources/transactions/types/index.d.mts +0 -1
- package/dist/esm/api/resources/transactions/types/index.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +2 -1
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": "12.
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/12.
|
|
46
|
+
"X-Fern-SDK-Version": "12.3.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/12.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);
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CardNetwork.js"), exports);
|
|
17
18
|
__exportStar(require("./CategoryOption.js"), exports);
|
|
18
19
|
__exportStar(require("./CommissionType.js"), exports);
|
|
19
20
|
__exportStar(require("./CommissionValue.js"), exports);
|
|
@@ -287,7 +287,8 @@ export declare class TransactionsClient {
|
|
|
287
287
|
*
|
|
288
288
|
* @example
|
|
289
289
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
290
|
-
* "page[size]": 10
|
|
290
|
+
* "page[size]": 10,
|
|
291
|
+
* include: "merchant,offer"
|
|
291
292
|
* })
|
|
292
293
|
*/
|
|
293
294
|
getEarnedRewards(organizationId: KardApi.OrganizationId, userId: string, request?: KardApi.GetEarnedRewardsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.GetEarnedRewardsResponse>;
|
|
@@ -588,7 +588,8 @@ class TransactionsClient {
|
|
|
588
588
|
*
|
|
589
589
|
* @example
|
|
590
590
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
591
|
-
* "page[size]": 10
|
|
591
|
+
* "page[size]": 10,
|
|
592
|
+
* include: "merchant,offer"
|
|
592
593
|
* })
|
|
593
594
|
*/
|
|
594
595
|
getEarnedRewards(organizationId, userId, request = {}, requestOptions) {
|
|
@@ -597,7 +598,7 @@ class TransactionsClient {
|
|
|
597
598
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
598
599
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
599
600
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
600
|
-
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize } = request;
|
|
601
|
+
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, include } = request;
|
|
601
602
|
const _queryParams = {};
|
|
602
603
|
if (pageAfter != null) {
|
|
603
604
|
_queryParams["page[after]"] = pageAfter;
|
|
@@ -608,6 +609,9 @@ class TransactionsClient {
|
|
|
608
609
|
if (pageSize != null) {
|
|
609
610
|
_queryParams["page[size]"] = pageSize.toString();
|
|
610
611
|
}
|
|
612
|
+
if (include != null) {
|
|
613
|
+
_queryParams.include = include;
|
|
614
|
+
}
|
|
611
615
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
612
616
|
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);
|
|
613
617
|
const _response = yield core.fetcher({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* "page[size]": 10
|
|
4
|
+
* "page[size]": 10,
|
|
5
|
+
* include: "merchant,offer"
|
|
5
6
|
* }
|
|
6
7
|
*/
|
|
7
8
|
export interface GetEarnedRewardsRequest {
|
|
@@ -11,4 +12,6 @@ export interface GetEarnedRewardsRequest {
|
|
|
11
12
|
"page[before]"?: string;
|
|
12
13
|
/** Number of results per page */
|
|
13
14
|
"page[size]"?: number;
|
|
15
|
+
/** Comma-separated list of related resources to include in the response. Supported values are `merchant` and `offer`. */
|
|
16
|
+
include?: string;
|
|
14
17
|
}
|
|
@@ -3,7 +3,6 @@ export * from "./AuditRequestData.js";
|
|
|
3
3
|
export * from "./AuditResponseAttributes.js";
|
|
4
4
|
export * from "./AuditResponseData.js";
|
|
5
5
|
export * from "./AuditStatus.js";
|
|
6
|
-
export * from "./CardNetwork.js";
|
|
7
6
|
export * from "./CommissionEarnedDetails.js";
|
|
8
7
|
export * from "./CoreTransactionAttributes.js";
|
|
9
8
|
export * from "./CoreTransactionRequest.js";
|
|
@@ -19,7 +19,6 @@ __exportStar(require("./AuditRequestData.js"), exports);
|
|
|
19
19
|
__exportStar(require("./AuditResponseAttributes.js"), exports);
|
|
20
20
|
__exportStar(require("./AuditResponseData.js"), exports);
|
|
21
21
|
__exportStar(require("./AuditStatus.js"), exports);
|
|
22
|
-
__exportStar(require("./CardNetwork.js"), exports);
|
|
23
22
|
__exportStar(require("./CommissionEarnedDetails.js"), exports);
|
|
24
23
|
__exportStar(require("./CoreTransactionAttributes.js"), exports);
|
|
25
24
|
__exportStar(require("./CoreTransactionRequest.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "12.
|
|
1
|
+
export declare const SDK_VERSION = "12.3.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": "12.
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/12.
|
|
9
|
+
"X-Fern-SDK-Version": "12.3.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/12.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);
|
|
@@ -287,7 +287,8 @@ export declare class TransactionsClient {
|
|
|
287
287
|
*
|
|
288
288
|
* @example
|
|
289
289
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
290
|
-
* "page[size]": 10
|
|
290
|
+
* "page[size]": 10,
|
|
291
|
+
* include: "merchant,offer"
|
|
291
292
|
* })
|
|
292
293
|
*/
|
|
293
294
|
getEarnedRewards(organizationId: KardApi.OrganizationId, userId: string, request?: KardApi.GetEarnedRewardsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.GetEarnedRewardsResponse>;
|
|
@@ -552,7 +552,8 @@ export class TransactionsClient {
|
|
|
552
552
|
*
|
|
553
553
|
* @example
|
|
554
554
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
555
|
-
* "page[size]": 10
|
|
555
|
+
* "page[size]": 10,
|
|
556
|
+
* include: "merchant,offer"
|
|
556
557
|
* })
|
|
557
558
|
*/
|
|
558
559
|
getEarnedRewards(organizationId, userId, request = {}, requestOptions) {
|
|
@@ -561,7 +562,7 @@ export class TransactionsClient {
|
|
|
561
562
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
562
563
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
563
564
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
564
|
-
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize } = request;
|
|
565
|
+
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, include } = request;
|
|
565
566
|
const _queryParams = {};
|
|
566
567
|
if (pageAfter != null) {
|
|
567
568
|
_queryParams["page[after]"] = pageAfter;
|
|
@@ -572,6 +573,9 @@ export class TransactionsClient {
|
|
|
572
573
|
if (pageSize != null) {
|
|
573
574
|
_queryParams["page[size]"] = pageSize.toString();
|
|
574
575
|
}
|
|
576
|
+
if (include != null) {
|
|
577
|
+
_queryParams.include = include;
|
|
578
|
+
}
|
|
575
579
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
576
580
|
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);
|
|
577
581
|
const _response = yield core.fetcher({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* "page[size]": 10
|
|
4
|
+
* "page[size]": 10,
|
|
5
|
+
* include: "merchant,offer"
|
|
5
6
|
* }
|
|
6
7
|
*/
|
|
7
8
|
export interface GetEarnedRewardsRequest {
|
|
@@ -11,4 +12,6 @@ export interface GetEarnedRewardsRequest {
|
|
|
11
12
|
"page[before]"?: string;
|
|
12
13
|
/** Number of results per page */
|
|
13
14
|
"page[size]"?: number;
|
|
15
|
+
/** Comma-separated list of related resources to include in the response. Supported values are `merchant` and `offer`. */
|
|
16
|
+
include?: string;
|
|
14
17
|
}
|
|
@@ -3,7 +3,6 @@ export * from "./AuditRequestData.mjs";
|
|
|
3
3
|
export * from "./AuditResponseAttributes.mjs";
|
|
4
4
|
export * from "./AuditResponseData.mjs";
|
|
5
5
|
export * from "./AuditStatus.mjs";
|
|
6
|
-
export * from "./CardNetwork.mjs";
|
|
7
6
|
export * from "./CommissionEarnedDetails.mjs";
|
|
8
7
|
export * from "./CoreTransactionAttributes.mjs";
|
|
9
8
|
export * from "./CoreTransactionRequest.mjs";
|
|
@@ -3,7 +3,6 @@ export * from "./AuditRequestData.mjs";
|
|
|
3
3
|
export * from "./AuditResponseAttributes.mjs";
|
|
4
4
|
export * from "./AuditResponseData.mjs";
|
|
5
5
|
export * from "./AuditStatus.mjs";
|
|
6
|
-
export * from "./CardNetwork.mjs";
|
|
7
6
|
export * from "./CommissionEarnedDetails.mjs";
|
|
8
7
|
export * from "./CoreTransactionAttributes.mjs";
|
|
9
8
|
export * from "./CoreTransactionRequest.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "12.
|
|
1
|
+
export declare const SDK_VERSION = "12.3.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "12.
|
|
1
|
+
export const SDK_VERSION = "12.3.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -848,7 +848,8 @@ Retrieve rewarded transaction history for a specific user. Returns only SETTLED
|
|
|
848
848
|
|
|
849
849
|
```typescript
|
|
850
850
|
await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
851
|
-
"page[size]": 10
|
|
851
|
+
"page[size]": 10,
|
|
852
|
+
include: "merchant,offer"
|
|
852
853
|
});
|
|
853
854
|
|
|
854
855
|
```
|