@kard-financial/sdk 23.0.1 → 23.1.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/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/transactions/client/Client.js +3 -2
- package/dist/cjs/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsMeta.d.ts +1 -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/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/transactions/client/Client.mjs +3 -2
- package/dist/esm/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.mts +2 -0
- package/dist/esm/api/resources/transactions/types/GetEarnedRewardsMeta.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1 -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": "23.0
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/23.0
|
|
46
|
+
"X-Fern-SDK-Version": "23.1.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/23.1.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);
|
|
@@ -278,7 +278,7 @@ export declare class TransactionsClient {
|
|
|
278
278
|
createBulkTransactionsUploadUrl(organizationId: KardApi.OrganizationId, request: KardApi.CreateFileUploadRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateFileUploadUrlResponse>;
|
|
279
279
|
private __createBulkTransactionsUploadUrl;
|
|
280
280
|
/**
|
|
281
|
-
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
281
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`). Pass `filter[includeUnpaid]=true` to also return matched transactions that have not yet been paid in full.
|
|
282
282
|
* <br/>
|
|
283
283
|
* <b>Required scopes:</b> `transaction:read`
|
|
284
284
|
* <br/>
|
|
@@ -505,7 +505,7 @@ class TransactionsClient {
|
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
508
|
-
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
508
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`). Pass `filter[includeUnpaid]=true` to also return matched transactions that have not yet been paid in full.
|
|
509
509
|
* <br/>
|
|
510
510
|
* <b>Required scopes:</b> `transaction:read`
|
|
511
511
|
* <br/>
|
|
@@ -534,12 +534,13 @@ class TransactionsClient {
|
|
|
534
534
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
535
535
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
536
536
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
537
|
-
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, "filter[status]": filterStatus, include, } = request;
|
|
537
|
+
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, "filter[status]": filterStatus, "filter[includeUnpaid]": filterIncludeUnpaid, include, } = request;
|
|
538
538
|
const _queryParams = {
|
|
539
539
|
"page[after]": pageAfter,
|
|
540
540
|
"page[before]": pageBefore,
|
|
541
541
|
"page[size]": pageSize,
|
|
542
542
|
"filter[status]": filterStatus != null ? filterStatus : undefined,
|
|
543
|
+
"filter[includeUnpaid]": filterIncludeUnpaid,
|
|
543
544
|
include,
|
|
544
545
|
};
|
|
545
546
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
@@ -16,6 +16,8 @@ export interface GetEarnedRewardsRequest {
|
|
|
16
16
|
"page[size]"?: number;
|
|
17
17
|
/** Filter by transaction status. Supported values are `APPROVED` and `SETTLED`. Defaults to `SETTLED` when omitted. When `APPROVED` is specified, only approved transactions that do not yet have a corresponding settled transaction are returned. */
|
|
18
18
|
"filter[status]"?: KardApi.RewardedTransactionStatus;
|
|
19
|
+
/** When `true`, return any matched transaction regardless of payment status. By default (`false`), only transactions that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`) are returned. This also controls whether unpaid transactions contribute to `lifetimeRewardsInCents`. Has no effect on `APPROVED` transactions, which are always returned when requested. */
|
|
20
|
+
"filter[includeUnpaid]"?: boolean;
|
|
19
21
|
/** Comma-separated list of related resources to include in the response. Supported values are `merchant` and `offer`. */
|
|
20
22
|
include?: string;
|
|
21
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface GetEarnedRewardsMeta {
|
|
2
|
-
/** Lifetime rewards earned by the user across
|
|
2
|
+
/** Lifetime rewards earned by the user across matched transactions in cents. By default only transactions paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`) are included; pass `filter[includeUnpaid]=true` to include all matched transactions. */
|
|
3
3
|
lifetimeRewardsInCents: number;
|
|
4
4
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "23.0
|
|
1
|
+
export declare const SDK_VERSION = "23.1.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": "23.0
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/23.0
|
|
9
|
+
"X-Fern-SDK-Version": "23.1.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/23.1.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);
|
|
@@ -278,7 +278,7 @@ export declare class TransactionsClient {
|
|
|
278
278
|
createBulkTransactionsUploadUrl(organizationId: KardApi.OrganizationId, request: KardApi.CreateFileUploadRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateFileUploadUrlResponse>;
|
|
279
279
|
private __createBulkTransactionsUploadUrl;
|
|
280
280
|
/**
|
|
281
|
-
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
281
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`). Pass `filter[includeUnpaid]=true` to also return matched transactions that have not yet been paid in full.
|
|
282
282
|
* <br/>
|
|
283
283
|
* <b>Required scopes:</b> `transaction:read`
|
|
284
284
|
* <br/>
|
|
@@ -469,7 +469,7 @@ export class TransactionsClient {
|
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
471
|
/**
|
|
472
|
-
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
472
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`). Pass `filter[includeUnpaid]=true` to also return matched transactions that have not yet been paid in full.
|
|
473
473
|
* <br/>
|
|
474
474
|
* <b>Required scopes:</b> `transaction:read`
|
|
475
475
|
* <br/>
|
|
@@ -498,12 +498,13 @@ export class TransactionsClient {
|
|
|
498
498
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
499
499
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
500
500
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
501
|
-
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, "filter[status]": filterStatus, include, } = request;
|
|
501
|
+
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, "filter[status]": filterStatus, "filter[includeUnpaid]": filterIncludeUnpaid, include, } = request;
|
|
502
502
|
const _queryParams = {
|
|
503
503
|
"page[after]": pageAfter,
|
|
504
504
|
"page[before]": pageBefore,
|
|
505
505
|
"page[size]": pageSize,
|
|
506
506
|
"filter[status]": filterStatus != null ? filterStatus : undefined,
|
|
507
|
+
"filter[includeUnpaid]": filterIncludeUnpaid,
|
|
507
508
|
include,
|
|
508
509
|
};
|
|
509
510
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
@@ -16,6 +16,8 @@ export interface GetEarnedRewardsRequest {
|
|
|
16
16
|
"page[size]"?: number;
|
|
17
17
|
/** Filter by transaction status. Supported values are `APPROVED` and `SETTLED`. Defaults to `SETTLED` when omitted. When `APPROVED` is specified, only approved transactions that do not yet have a corresponding settled transaction are returned. */
|
|
18
18
|
"filter[status]"?: KardApi.RewardedTransactionStatus;
|
|
19
|
+
/** When `true`, return any matched transaction regardless of payment status. By default (`false`), only transactions that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`) are returned. This also controls whether unpaid transactions contribute to `lifetimeRewardsInCents`. Has no effect on `APPROVED` transactions, which are always returned when requested. */
|
|
20
|
+
"filter[includeUnpaid]"?: boolean;
|
|
19
21
|
/** Comma-separated list of related resources to include in the response. Supported values are `merchant` and `offer`. */
|
|
20
22
|
include?: string;
|
|
21
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface GetEarnedRewardsMeta {
|
|
2
|
-
/** Lifetime rewards earned by the user across
|
|
2
|
+
/** Lifetime rewards earned by the user across matched transactions in cents. By default only transactions paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`) are included; pass `filter[includeUnpaid]=true` to include all matched transactions. */
|
|
3
3
|
lifetimeRewardsInCents: number;
|
|
4
4
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "23.0
|
|
1
|
+
export declare const SDK_VERSION = "23.1.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "23.0
|
|
1
|
+
export const SDK_VERSION = "23.1.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2033,7 +2033,7 @@ await client.transactions.createBulkTransactionsUploadUrl("organization-123", {
|
|
|
2033
2033
|
<dl>
|
|
2034
2034
|
<dd>
|
|
2035
2035
|
|
|
2036
|
-
Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
2036
|
+
Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months that have been paid in full to the issuer (`paidToIssuer` is `PAID_IN_FULL`). Pass `filter[includeUnpaid]=true` to also return matched transactions that have not yet been paid in full.
|
|
2037
2037
|
<br/>
|
|
2038
2038
|
<b>Required scopes:</b> `transaction:read`
|
|
2039
2039
|
<br/>
|