@kard-financial/sdk 23.0.0 → 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.
Files changed (26) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/organizations/resources/children/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/organizations/resources/children/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.ts +1 -1
  5. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildAttributes.d.ts +2 -2
  6. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.ts +2 -2
  7. package/dist/cjs/api/resources/transactions/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/transactions/client/Client.js +3 -2
  9. package/dist/cjs/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.ts +2 -0
  10. package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsMeta.d.ts +1 -1
  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/organizations/resources/children/client/Client.d.mts +1 -1
  15. package/dist/esm/api/resources/organizations/resources/children/client/Client.mjs +1 -1
  16. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.mts +1 -1
  17. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.d.mts +2 -2
  18. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.mts +2 -2
  19. package/dist/esm/api/resources/transactions/client/Client.d.mts +1 -1
  20. package/dist/esm/api/resources/transactions/client/Client.mjs +3 -2
  21. package/dist/esm/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.mts +2 -0
  22. package/dist/esm/api/resources/transactions/types/GetEarnedRewardsMeta.d.mts +1 -1
  23. package/dist/esm/version.d.mts +1 -1
  24. package/dist/esm/version.mjs +1 -1
  25. package/package.json +1 -1
  26. package/reference.md +2 -2
@@ -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.0",
47
- "User-Agent": "@kard-financial/sdk/23.0.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);
@@ -28,7 +28,7 @@ export declare class ChildrenClient {
28
28
  list(organizationId: string, request?: KardApi.organizations.ListChildrenRequest, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationListResponse>;
29
29
  private __list;
30
30
  /**
31
- * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
31
+ * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must contain at least one letter, and may contain only letters and spaces.
32
32
  *
33
33
  * @param {string} organizationId - Unique identifier of the parent organization
34
34
  * @param {KardApi.organizations.CreateChildRequestBody} request
@@ -122,7 +122,7 @@ class ChildrenClient {
122
122
  });
123
123
  }
124
124
  /**
125
- * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
125
+ * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must contain at least one letter, and may contain only letters and spaces.
126
126
  *
127
127
  * @param {string} organizationId - Unique identifier of the parent organization
128
128
  * @param {KardApi.organizations.CreateChildRequestBody} request
@@ -2,7 +2,7 @@
2
2
  * Limited set of child organization attributes exposed to external consumers
3
3
  */
4
4
  export interface ChildOrganizationAttributes {
5
- /** Name of the child organization (uppercase, no spaces) */
5
+ /** Name of the child organization (at least one letter; letters and spaces only) */
6
6
  name: string;
7
7
  /** External identifier for the child organization */
8
8
  externalId?: string | undefined;
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * @example
5
5
  * {
6
- * name: "ACMECHILDBANK",
6
+ * name: "Acme Child Bank",
7
7
  * externalId: "ext-123",
8
8
  * bins: ["123456", "789012"]
9
9
  * }
10
10
  */
11
11
  export interface CreateChildAttributes {
12
- /** Name of the child organization (must be uppercase, no spaces) */
12
+ /** Name of the child organization (at least one letter; letters and spaces only) */
13
13
  name: string;
14
14
  /** External identifier for the child organization */
15
15
  externalId?: string | undefined;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @example
5
5
  * {
6
- * name: "NEWCHILDNAME"
6
+ * name: "New Child Name"
7
7
  * }
8
8
  *
9
9
  * @example
@@ -12,7 +12,7 @@
12
12
  * }
13
13
  */
14
14
  export interface UpdateChildAttributes {
15
- /** New name for the child organization (must be uppercase, no spaces) */
15
+ /** New name for the child organization (at least one letter; letters and spaces only) */
16
16
  name?: string | undefined;
17
17
  /** External identifier for the child organization */
18
18
  externalId?: string | undefined;
@@ -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 all matched transactions in cents. */
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
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "23.0.0";
1
+ export declare const SDK_VERSION = "23.1.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 = "23.0.0";
4
+ exports.SDK_VERSION = "23.1.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": "23.0.0",
10
- "User-Agent": "@kard-financial/sdk/23.0.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);
@@ -28,7 +28,7 @@ export declare class ChildrenClient {
28
28
  list(organizationId: string, request?: KardApi.organizations.ListChildrenRequest, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationListResponse>;
29
29
  private __list;
30
30
  /**
31
- * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
31
+ * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must contain at least one letter, and may contain only letters and spaces.
32
32
  *
33
33
  * @param {string} organizationId - Unique identifier of the parent organization
34
34
  * @param {KardApi.organizations.CreateChildRequestBody} request
@@ -86,7 +86,7 @@ export class ChildrenClient {
86
86
  });
87
87
  }
88
88
  /**
89
- * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
89
+ * Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must contain at least one letter, and may contain only letters and spaces.
90
90
  *
91
91
  * @param {string} organizationId - Unique identifier of the parent organization
92
92
  * @param {KardApi.organizations.CreateChildRequestBody} request
@@ -2,7 +2,7 @@
2
2
  * Limited set of child organization attributes exposed to external consumers
3
3
  */
4
4
  export interface ChildOrganizationAttributes {
5
- /** Name of the child organization (uppercase, no spaces) */
5
+ /** Name of the child organization (at least one letter; letters and spaces only) */
6
6
  name: string;
7
7
  /** External identifier for the child organization */
8
8
  externalId?: string | undefined;
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * @example
5
5
  * {
6
- * name: "ACMECHILDBANK",
6
+ * name: "Acme Child Bank",
7
7
  * externalId: "ext-123",
8
8
  * bins: ["123456", "789012"]
9
9
  * }
10
10
  */
11
11
  export interface CreateChildAttributes {
12
- /** Name of the child organization (must be uppercase, no spaces) */
12
+ /** Name of the child organization (at least one letter; letters and spaces only) */
13
13
  name: string;
14
14
  /** External identifier for the child organization */
15
15
  externalId?: string | undefined;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @example
5
5
  * {
6
- * name: "NEWCHILDNAME"
6
+ * name: "New Child Name"
7
7
  * }
8
8
  *
9
9
  * @example
@@ -12,7 +12,7 @@
12
12
  * }
13
13
  */
14
14
  export interface UpdateChildAttributes {
15
- /** New name for the child organization (must be uppercase, no spaces) */
15
+ /** New name for the child organization (at least one letter; letters and spaces only) */
16
16
  name?: string | undefined;
17
17
  /** External identifier for the child organization */
18
18
  externalId?: string | undefined;
@@ -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 all matched transactions in cents. */
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
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "23.0.0";
1
+ export declare const SDK_VERSION = "23.1.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "23.0.0";
1
+ export const SDK_VERSION = "23.1.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "23.0.0",
3
+ "version": "23.1.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -516,7 +516,7 @@ await client.organizations.children.list("organizationId");
516
516
  <dl>
517
517
  <dd>
518
518
 
519
- Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
519
+ Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must contain at least one letter, and may contain only letters and spaces.
520
520
  </dd>
521
521
  </dl>
522
522
  </dd>
@@ -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/>