@kard-financial/sdk 6.0.0 → 8.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.
Files changed (68) hide show
  1. package/README.md +6 -1
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/users/client/Client.d.ts +13 -4
  4. package/dist/cjs/api/resources/users/client/Client.js +11 -2
  5. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBar.d.ts +2 -2
  6. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.ts +9 -0
  7. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabels.d.ts +2 -2
  8. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegment.d.ts +10 -0
  9. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegment.js +3 -0
  10. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegmentPosition.d.ts +7 -0
  11. package/dist/cjs/api/resources/users/resources/rewards/types/{ProgressBarLabelPosition.js → ProgressBarSegmentPosition.js} +4 -3
  12. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegments.d.ts +10 -0
  13. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegments.js +3 -0
  14. package/dist/cjs/api/resources/users/resources/rewards/types/index.d.ts +4 -2
  15. package/dist/cjs/api/resources/users/resources/rewards/types/index.js +4 -2
  16. package/dist/cjs/api/resources/users/types/CreateUsersObject.d.ts +6 -1
  17. package/dist/cjs/api/resources/users/types/UpdateUserObject.d.ts +6 -2
  18. package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.d.ts +15 -0
  19. package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.js +3 -0
  20. package/dist/cjs/api/resources/users/types/UpdateUserRequestData.d.ts +5 -0
  21. package/dist/cjs/api/resources/users/types/UpdateUserRequestData.js +3 -0
  22. package/dist/cjs/api/resources/users/types/UpdateUserRequestDataUnion.d.ts +7 -0
  23. package/dist/cjs/api/resources/users/types/UpdateUserRequestDataUnion.js +3 -0
  24. package/dist/cjs/api/resources/users/types/UserRequestAttributes.d.ts +2 -0
  25. package/dist/cjs/api/resources/users/types/UserResponseObject.d.ts +22 -0
  26. package/dist/cjs/api/resources/users/types/UserResponseObject.js +3 -0
  27. package/dist/cjs/api/resources/users/types/index.d.ts +4 -0
  28. package/dist/cjs/api/resources/users/types/index.js +4 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/api/resources/users/client/Client.d.mts +13 -4
  33. package/dist/esm/api/resources/users/client/Client.mjs +11 -2
  34. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBar.d.mts +2 -2
  35. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.mts +9 -0
  36. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabels.d.mts +2 -2
  37. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegment.d.mts +10 -0
  38. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegment.mjs +2 -0
  39. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegmentPosition.d.mts +7 -0
  40. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegmentPosition.mjs +7 -0
  41. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegments.d.mts +10 -0
  42. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegments.mjs +2 -0
  43. package/dist/esm/api/resources/users/resources/rewards/types/index.d.mts +4 -2
  44. package/dist/esm/api/resources/users/resources/rewards/types/index.mjs +4 -2
  45. package/dist/esm/api/resources/users/types/CreateUsersObject.d.mts +6 -1
  46. package/dist/esm/api/resources/users/types/UpdateUserObject.d.mts +6 -2
  47. package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.d.mts +15 -0
  48. package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.mjs +2 -0
  49. package/dist/esm/api/resources/users/types/UpdateUserRequestData.d.mts +5 -0
  50. package/dist/esm/api/resources/users/types/UpdateUserRequestData.mjs +2 -0
  51. package/dist/esm/api/resources/users/types/UpdateUserRequestDataUnion.d.mts +7 -0
  52. package/dist/esm/api/resources/users/types/UpdateUserRequestDataUnion.mjs +2 -0
  53. package/dist/esm/api/resources/users/types/UserRequestAttributes.d.mts +2 -0
  54. package/dist/esm/api/resources/users/types/UserResponseObject.d.mts +22 -0
  55. package/dist/esm/api/resources/users/types/UserResponseObject.mjs +2 -0
  56. package/dist/esm/api/resources/users/types/index.d.mts +4 -0
  57. package/dist/esm/api/resources/users/types/index.mjs +4 -0
  58. package/dist/esm/version.d.mts +1 -1
  59. package/dist/esm/version.mjs +1 -1
  60. package/package.json +1 -1
  61. package/reference.md +13 -4
  62. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabel.d.ts +0 -10
  63. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabelPosition.d.ts +0 -6
  64. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabel.d.mts +0 -10
  65. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabelPosition.d.mts +0 -6
  66. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabelPosition.mjs +0 -6
  67. /package/dist/cjs/api/resources/users/resources/rewards/types/{ProgressBarLabel.js → ProgressBarLabelPair.js} +0 -0
  68. /package/dist/esm/api/resources/users/resources/rewards/types/{ProgressBarLabel.mjs → ProgressBarLabelPair.mjs} +0 -0
package/README.md CHANGED
@@ -29,7 +29,12 @@ await client.users.create("organization-123", {
29
29
  id: "1234567890",
30
30
  attributes: {
31
31
  zipCode: "11238",
32
- enrolledRewards: ["CARDLINKED"]
32
+ enrolledRewards: ["CARDLINKED"],
33
+ email: "user@example.com",
34
+ hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
35
+ phoneNumber: "+14155552671",
36
+ birthYear: "1990",
37
+ historicalTransactionsSent: true
33
38
  }
34
39
  }]
35
40
  });
@@ -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": "6.0.0",
47
- "User-Agent": "@kard-financial/sdk/6.0.0",
46
+ "X-Fern-SDK-Version": "8.0.0",
47
+ "User-Agent": "@kard-financial/sdk/8.0.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Kard-Target-Issuer": options === null || options === void 0 ? void 0 : options.xKardTargetIssuer,
@@ -46,7 +46,12 @@ export declare class UsersClient {
46
46
  * id: "1234567890",
47
47
  * attributes: {
48
48
  * zipCode: "11238",
49
- * enrolledRewards: ["CARDLINKED"]
49
+ * enrolledRewards: ["CARDLINKED"],
50
+ * email: "user@example.com",
51
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
52
+ * phoneNumber: "+14155552671",
53
+ * birthYear: "1990",
54
+ * historicalTransactionsSent: true
50
55
  * }
51
56
  * }]
52
57
  * })
@@ -75,12 +80,16 @@ export declare class UsersClient {
75
80
  * id: "1234567890",
76
81
  * attributes: {
77
82
  * zipCode: "11238",
78
- * enrolledRewards: ["CARDLINKED"]
83
+ * enrolledRewards: ["CARDLINKED"],
84
+ * email: "user@example.com",
85
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
86
+ * phoneNumber: "+14155552671",
87
+ * birthYear: "1990"
79
88
  * }
80
89
  * }
81
90
  * })
82
91
  */
83
- update(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request: KardApi.UpdateUserObject, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
92
+ update(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request: KardApi.UpdateUserObject, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UserResponseObject>;
84
93
  private __update;
85
94
  /**
86
95
  * Call this endpoint to delete a specified enrolled user from the rewards program and Kard's system. Users can be re-enrolled into rewards by calling the [Create User](/2024-10-01/api/users/create) endpoint using the same `id` from before.<br/>
@@ -117,6 +126,6 @@ export declare class UsersClient {
117
126
  * @example
118
127
  * await client.users.get("organization-123", "user-123")
119
128
  */
120
- get(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
129
+ get(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UserResponseObject>;
121
130
  private __get;
122
131
  }
@@ -97,7 +97,12 @@ class UsersClient {
97
97
  * id: "1234567890",
98
98
  * attributes: {
99
99
  * zipCode: "11238",
100
- * enrolledRewards: ["CARDLINKED"]
100
+ * enrolledRewards: ["CARDLINKED"],
101
+ * email: "user@example.com",
102
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
103
+ * phoneNumber: "+14155552671",
104
+ * birthYear: "1990",
105
+ * historicalTransactionsSent: true
101
106
  * }
102
107
  * }]
103
108
  * })
@@ -193,7 +198,11 @@ class UsersClient {
193
198
  * id: "1234567890",
194
199
  * attributes: {
195
200
  * zipCode: "11238",
196
- * enrolledRewards: ["CARDLINKED"]
201
+ * enrolledRewards: ["CARDLINKED"],
202
+ * email: "user@example.com",
203
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
204
+ * phoneNumber: "+14155552671",
205
+ * birthYear: "1990"
197
206
  * }
198
207
  * }
199
208
  * })
@@ -11,8 +11,8 @@ export interface ProgressBar {
11
11
  label: string;
12
12
  /** Whether the progress bar should be displayed as segmented */
13
13
  segmented: boolean;
14
- /** SVG icon to use for each segment when the progress bar is segmented */
15
- segmentIcon?: string;
14
+ /** Segment configuration for the progress bar in different layouts */
15
+ segments?: KardApi.users.ProgressBarSegments;
16
16
  /** Labels to render around the progress bar in different layouts */
17
17
  labels: KardApi.users.ProgressBarLabels;
18
18
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Left and right label configuration for a specific layout
3
+ */
4
+ export interface ProgressBarLabelPair {
5
+ /** Text content for the left label */
6
+ left?: string;
7
+ /** Text content for the right label */
8
+ right?: string;
9
+ }
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.js";
4
4
  */
5
5
  export interface ProgressBarLabels {
6
6
  /** Label configuration for the details view */
7
- details: KardApi.users.ProgressBarLabel;
7
+ details?: KardApi.users.ProgressBarLabelPair;
8
8
  /** Label configuration for the default view */
9
- default: KardApi.users.ProgressBarLabel;
9
+ default: KardApi.users.ProgressBarLabelPair;
10
10
  }
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Segment configuration for a specific layout
4
+ */
5
+ export interface ProgressBarSegment {
6
+ /** SVG icon to use for each segment */
7
+ icon?: string;
8
+ /** Position of the segment within the layout */
9
+ position: KardApi.users.ProgressBarSegmentPosition;
10
+ }
@@ -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 });
@@ -0,0 +1,7 @@
1
+ /** Supported segment positions */
2
+ export declare const ProgressBarSegmentPosition: {
3
+ readonly Left: "LEFT";
4
+ readonly Right: "RIGHT";
5
+ readonly FullWidth: "FULL_WIDTH";
6
+ };
7
+ export type ProgressBarSegmentPosition = (typeof ProgressBarSegmentPosition)[keyof typeof ProgressBarSegmentPosition];
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ProgressBarLabelPosition = void 0;
5
- /** Supported progress bar label positions */
6
- exports.ProgressBarLabelPosition = {
4
+ exports.ProgressBarSegmentPosition = void 0;
5
+ /** Supported segment positions */
6
+ exports.ProgressBarSegmentPosition = {
7
7
  Left: "LEFT",
8
8
  Right: "RIGHT",
9
+ FullWidth: "FULL_WIDTH",
9
10
  };
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Segment configuration for the progress bar in different layouts
4
+ */
5
+ export interface ProgressBarSegments {
6
+ /** Segment configuration for the details view */
7
+ details?: KardApi.users.ProgressBarSegment;
8
+ /** Segment configuration for the default view */
9
+ default: KardApi.users.ProgressBarSegment;
10
+ }
@@ -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 });
@@ -37,9 +37,11 @@ export * from "./OperationHours.js";
37
37
  export * from "./OperationPeriod.js";
38
38
  export * from "./OperationTime.js";
39
39
  export * from "./ProgressBar.js";
40
- export * from "./ProgressBarLabel.js";
41
- export * from "./ProgressBarLabelPosition.js";
40
+ export * from "./ProgressBarLabelPair.js";
42
41
  export * from "./ProgressBarLabels.js";
42
+ export * from "./ProgressBarSegment.js";
43
+ export * from "./ProgressBarSegmentPosition.js";
44
+ export * from "./ProgressBarSegments.js";
43
45
  export * from "./StandardOffer.js";
44
46
  export * from "./StandardOfferCore.js";
45
47
  export * from "./StandardOfferFields.js";
@@ -53,9 +53,11 @@ __exportStar(require("./OperationHours.js"), exports);
53
53
  __exportStar(require("./OperationPeriod.js"), exports);
54
54
  __exportStar(require("./OperationTime.js"), exports);
55
55
  __exportStar(require("./ProgressBar.js"), exports);
56
- __exportStar(require("./ProgressBarLabel.js"), exports);
57
- __exportStar(require("./ProgressBarLabelPosition.js"), exports);
56
+ __exportStar(require("./ProgressBarLabelPair.js"), exports);
58
57
  __exportStar(require("./ProgressBarLabels.js"), exports);
58
+ __exportStar(require("./ProgressBarSegment.js"), exports);
59
+ __exportStar(require("./ProgressBarSegmentPosition.js"), exports);
60
+ __exportStar(require("./ProgressBarSegments.js"), exports);
59
61
  __exportStar(require("./StandardOffer.js"), exports);
60
62
  __exportStar(require("./StandardOfferCore.js"), exports);
61
63
  __exportStar(require("./StandardOfferFields.js"), exports);
@@ -7,7 +7,12 @@ import type * as KardApi from "../../../index.js";
7
7
  * id: "1234567890",
8
8
  * attributes: {
9
9
  * zipCode: "11238",
10
- * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked]
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990",
15
+ * historicalTransactionsSent: true
11
16
  * }
12
17
  * }]
13
18
  * }
@@ -7,11 +7,15 @@ import type * as KardApi from "../../../index.js";
7
7
  * id: "1234567890",
8
8
  * attributes: {
9
9
  * zipCode: "11238",
10
- * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked]
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990"
11
15
  * }
12
16
  * }
13
17
  * }
14
18
  */
15
19
  export interface UpdateUserObject {
16
- data: KardApi.UserRequestDataUnion;
20
+ data: KardApi.UpdateUserRequestDataUnion;
17
21
  }
@@ -0,0 +1,15 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface UpdateUserRequestAttributes {
3
+ /** Rewards programs to enroll the user in. If an empty array is supplied, the user will not be enrolled in any programs. */
4
+ enrolledRewards: KardApi.EnrolledRewardsType[];
5
+ /** Zipcode of user */
6
+ zipCode?: string;
7
+ /** Email address of user */
8
+ email?: string;
9
+ /** Hashed email address of user (using SHA-256) */
10
+ hashedEmail?: string;
11
+ /** Phone number of user in E.164 format */
12
+ phoneNumber?: string;
13
+ /** Birth year of user */
14
+ birthYear?: string;
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 });
@@ -0,0 +1,5 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface UpdateUserRequestData {
3
+ id: KardApi.UserId;
4
+ attributes: KardApi.UpdateUserRequestAttributes;
5
+ }
@@ -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 });
@@ -0,0 +1,7 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export type UpdateUserRequestDataUnion = KardApi.UpdateUserRequestDataUnion.User;
3
+ export declare namespace UpdateUserRequestDataUnion {
4
+ interface User extends KardApi.UpdateUserRequestData {
5
+ type: "user";
6
+ }
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 });
@@ -12,4 +12,6 @@ export interface UserRequestAttributes {
12
12
  phoneNumber?: string;
13
13
  /** Birth year of user */
14
14
  birthYear?: string;
15
+ /** Indicates whether historical transactions have been sent for this user */
16
+ historicalTransactionsSent?: boolean;
15
17
  }
@@ -0,0 +1,22 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * data: {
6
+ * type: "user",
7
+ * id: "1234567890",
8
+ * attributes: {
9
+ * zipCode: "11238",
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990",
15
+ * historicalTransactionsSent: true
16
+ * }
17
+ * }
18
+ * }
19
+ */
20
+ export interface UserResponseObject {
21
+ data: KardApi.UserRequestDataUnion;
22
+ }
@@ -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 });
@@ -2,8 +2,12 @@ export * from "./CreateUsersMultiStatusResponse.js";
2
2
  export * from "./CreateUsersObject.js";
3
3
  export * from "./DeleteUserResponseObject.js";
4
4
  export * from "./UpdateUserObject.js";
5
+ export * from "./UpdateUserRequestAttributes.js";
6
+ export * from "./UpdateUserRequestData.js";
7
+ export * from "./UpdateUserRequestDataUnion.js";
5
8
  export * from "./UserRequestAttributes.js";
6
9
  export * from "./UserRequestData.js";
7
10
  export * from "./UserRequestDataUnion.js";
8
11
  export * from "./UserResponseNoData.js";
12
+ export * from "./UserResponseObject.js";
9
13
  export * from "./UserResponseUnionNoData.js";
@@ -18,8 +18,12 @@ __exportStar(require("./CreateUsersMultiStatusResponse.js"), exports);
18
18
  __exportStar(require("./CreateUsersObject.js"), exports);
19
19
  __exportStar(require("./DeleteUserResponseObject.js"), exports);
20
20
  __exportStar(require("./UpdateUserObject.js"), exports);
21
+ __exportStar(require("./UpdateUserRequestAttributes.js"), exports);
22
+ __exportStar(require("./UpdateUserRequestData.js"), exports);
23
+ __exportStar(require("./UpdateUserRequestDataUnion.js"), exports);
21
24
  __exportStar(require("./UserRequestAttributes.js"), exports);
22
25
  __exportStar(require("./UserRequestData.js"), exports);
23
26
  __exportStar(require("./UserRequestDataUnion.js"), exports);
24
27
  __exportStar(require("./UserResponseNoData.js"), exports);
28
+ __exportStar(require("./UserResponseObject.js"), exports);
25
29
  __exportStar(require("./UserResponseUnionNoData.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "6.0.0";
1
+ export declare const SDK_VERSION = "8.0.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 = "6.0.0";
4
+ exports.SDK_VERSION = "8.0.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": "6.0.0",
10
- "User-Agent": "@kard-financial/sdk/6.0.0",
9
+ "X-Fern-SDK-Version": "8.0.0",
10
+ "User-Agent": "@kard-financial/sdk/8.0.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Kard-Target-Issuer": options === null || options === void 0 ? void 0 : options.xKardTargetIssuer,
@@ -46,7 +46,12 @@ export declare class UsersClient {
46
46
  * id: "1234567890",
47
47
  * attributes: {
48
48
  * zipCode: "11238",
49
- * enrolledRewards: ["CARDLINKED"]
49
+ * enrolledRewards: ["CARDLINKED"],
50
+ * email: "user@example.com",
51
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
52
+ * phoneNumber: "+14155552671",
53
+ * birthYear: "1990",
54
+ * historicalTransactionsSent: true
50
55
  * }
51
56
  * }]
52
57
  * })
@@ -75,12 +80,16 @@ export declare class UsersClient {
75
80
  * id: "1234567890",
76
81
  * attributes: {
77
82
  * zipCode: "11238",
78
- * enrolledRewards: ["CARDLINKED"]
83
+ * enrolledRewards: ["CARDLINKED"],
84
+ * email: "user@example.com",
85
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
86
+ * phoneNumber: "+14155552671",
87
+ * birthYear: "1990"
79
88
  * }
80
89
  * }
81
90
  * })
82
91
  */
83
- update(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request: KardApi.UpdateUserObject, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
92
+ update(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request: KardApi.UpdateUserObject, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UserResponseObject>;
84
93
  private __update;
85
94
  /**
86
95
  * Call this endpoint to delete a specified enrolled user from the rewards program and Kard's system. Users can be re-enrolled into rewards by calling the [Create User](/2024-10-01/api/users/create) endpoint using the same `id` from before.<br/>
@@ -117,6 +126,6 @@ export declare class UsersClient {
117
126
  * @example
118
127
  * await client.users.get("organization-123", "user-123")
119
128
  */
120
- get(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
129
+ get(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<KardApi.UserResponseObject>;
121
130
  private __get;
122
131
  }
@@ -61,7 +61,12 @@ export class UsersClient {
61
61
  * id: "1234567890",
62
62
  * attributes: {
63
63
  * zipCode: "11238",
64
- * enrolledRewards: ["CARDLINKED"]
64
+ * enrolledRewards: ["CARDLINKED"],
65
+ * email: "user@example.com",
66
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
67
+ * phoneNumber: "+14155552671",
68
+ * birthYear: "1990",
69
+ * historicalTransactionsSent: true
65
70
  * }
66
71
  * }]
67
72
  * })
@@ -157,7 +162,11 @@ export class UsersClient {
157
162
  * id: "1234567890",
158
163
  * attributes: {
159
164
  * zipCode: "11238",
160
- * enrolledRewards: ["CARDLINKED"]
165
+ * enrolledRewards: ["CARDLINKED"],
166
+ * email: "user@example.com",
167
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
168
+ * phoneNumber: "+14155552671",
169
+ * birthYear: "1990"
161
170
  * }
162
171
  * }
163
172
  * })
@@ -11,8 +11,8 @@ export interface ProgressBar {
11
11
  label: string;
12
12
  /** Whether the progress bar should be displayed as segmented */
13
13
  segmented: boolean;
14
- /** SVG icon to use for each segment when the progress bar is segmented */
15
- segmentIcon?: string;
14
+ /** Segment configuration for the progress bar in different layouts */
15
+ segments?: KardApi.users.ProgressBarSegments;
16
16
  /** Labels to render around the progress bar in different layouts */
17
17
  labels: KardApi.users.ProgressBarLabels;
18
18
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Left and right label configuration for a specific layout
3
+ */
4
+ export interface ProgressBarLabelPair {
5
+ /** Text content for the left label */
6
+ left?: string;
7
+ /** Text content for the right label */
8
+ right?: string;
9
+ }
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.mjs";
4
4
  */
5
5
  export interface ProgressBarLabels {
6
6
  /** Label configuration for the details view */
7
- details: KardApi.users.ProgressBarLabel;
7
+ details?: KardApi.users.ProgressBarLabelPair;
8
8
  /** Label configuration for the default view */
9
- default: KardApi.users.ProgressBarLabel;
9
+ default: KardApi.users.ProgressBarLabelPair;
10
10
  }
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Segment configuration for a specific layout
4
+ */
5
+ export interface ProgressBarSegment {
6
+ /** SVG icon to use for each segment */
7
+ icon?: string;
8
+ /** Position of the segment within the layout */
9
+ position: KardApi.users.ProgressBarSegmentPosition;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ /** Supported segment positions */
2
+ export declare const ProgressBarSegmentPosition: {
3
+ readonly Left: "LEFT";
4
+ readonly Right: "RIGHT";
5
+ readonly FullWidth: "FULL_WIDTH";
6
+ };
7
+ export type ProgressBarSegmentPosition = (typeof ProgressBarSegmentPosition)[keyof typeof ProgressBarSegmentPosition];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Supported segment positions */
3
+ export const ProgressBarSegmentPosition = {
4
+ Left: "LEFT",
5
+ Right: "RIGHT",
6
+ FullWidth: "FULL_WIDTH",
7
+ };
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Segment configuration for the progress bar in different layouts
4
+ */
5
+ export interface ProgressBarSegments {
6
+ /** Segment configuration for the details view */
7
+ details?: KardApi.users.ProgressBarSegment;
8
+ /** Segment configuration for the default view */
9
+ default: KardApi.users.ProgressBarSegment;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -37,9 +37,11 @@ export * from "./OperationHours.mjs";
37
37
  export * from "./OperationPeriod.mjs";
38
38
  export * from "./OperationTime.mjs";
39
39
  export * from "./ProgressBar.mjs";
40
- export * from "./ProgressBarLabel.mjs";
41
- export * from "./ProgressBarLabelPosition.mjs";
40
+ export * from "./ProgressBarLabelPair.mjs";
42
41
  export * from "./ProgressBarLabels.mjs";
42
+ export * from "./ProgressBarSegment.mjs";
43
+ export * from "./ProgressBarSegmentPosition.mjs";
44
+ export * from "./ProgressBarSegments.mjs";
43
45
  export * from "./StandardOffer.mjs";
44
46
  export * from "./StandardOfferCore.mjs";
45
47
  export * from "./StandardOfferFields.mjs";
@@ -37,9 +37,11 @@ export * from "./OperationHours.mjs";
37
37
  export * from "./OperationPeriod.mjs";
38
38
  export * from "./OperationTime.mjs";
39
39
  export * from "./ProgressBar.mjs";
40
- export * from "./ProgressBarLabel.mjs";
41
- export * from "./ProgressBarLabelPosition.mjs";
40
+ export * from "./ProgressBarLabelPair.mjs";
42
41
  export * from "./ProgressBarLabels.mjs";
42
+ export * from "./ProgressBarSegment.mjs";
43
+ export * from "./ProgressBarSegmentPosition.mjs";
44
+ export * from "./ProgressBarSegments.mjs";
43
45
  export * from "./StandardOffer.mjs";
44
46
  export * from "./StandardOfferCore.mjs";
45
47
  export * from "./StandardOfferFields.mjs";
@@ -7,7 +7,12 @@ import type * as KardApi from "../../../index.mjs";
7
7
  * id: "1234567890",
8
8
  * attributes: {
9
9
  * zipCode: "11238",
10
- * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked]
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990",
15
+ * historicalTransactionsSent: true
11
16
  * }
12
17
  * }]
13
18
  * }
@@ -7,11 +7,15 @@ import type * as KardApi from "../../../index.mjs";
7
7
  * id: "1234567890",
8
8
  * attributes: {
9
9
  * zipCode: "11238",
10
- * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked]
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990"
11
15
  * }
12
16
  * }
13
17
  * }
14
18
  */
15
19
  export interface UpdateUserObject {
16
- data: KardApi.UserRequestDataUnion;
20
+ data: KardApi.UpdateUserRequestDataUnion;
17
21
  }
@@ -0,0 +1,15 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export interface UpdateUserRequestAttributes {
3
+ /** Rewards programs to enroll the user in. If an empty array is supplied, the user will not be enrolled in any programs. */
4
+ enrolledRewards: KardApi.EnrolledRewardsType[];
5
+ /** Zipcode of user */
6
+ zipCode?: string;
7
+ /** Email address of user */
8
+ email?: string;
9
+ /** Hashed email address of user (using SHA-256) */
10
+ hashedEmail?: string;
11
+ /** Phone number of user in E.164 format */
12
+ phoneNumber?: string;
13
+ /** Birth year of user */
14
+ birthYear?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export interface UpdateUserRequestData {
3
+ id: KardApi.UserId;
4
+ attributes: KardApi.UpdateUserRequestAttributes;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export type UpdateUserRequestDataUnion = KardApi.UpdateUserRequestDataUnion.User;
3
+ export declare namespace UpdateUserRequestDataUnion {
4
+ interface User extends KardApi.UpdateUserRequestData {
5
+ type: "user";
6
+ }
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -12,4 +12,6 @@ export interface UserRequestAttributes {
12
12
  phoneNumber?: string;
13
13
  /** Birth year of user */
14
14
  birthYear?: string;
15
+ /** Indicates whether historical transactions have been sent for this user */
16
+ historicalTransactionsSent?: boolean;
15
17
  }
@@ -0,0 +1,22 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * data: {
6
+ * type: "user",
7
+ * id: "1234567890",
8
+ * attributes: {
9
+ * zipCode: "11238",
10
+ * enrolledRewards: [KardApi.EnrolledRewardsType.Cardlinked],
11
+ * email: "user@example.com",
12
+ * hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
13
+ * phoneNumber: "+14155552671",
14
+ * birthYear: "1990",
15
+ * historicalTransactionsSent: true
16
+ * }
17
+ * }
18
+ * }
19
+ */
20
+ export interface UserResponseObject {
21
+ data: KardApi.UserRequestDataUnion;
22
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,8 +2,12 @@ export * from "./CreateUsersMultiStatusResponse.mjs";
2
2
  export * from "./CreateUsersObject.mjs";
3
3
  export * from "./DeleteUserResponseObject.mjs";
4
4
  export * from "./UpdateUserObject.mjs";
5
+ export * from "./UpdateUserRequestAttributes.mjs";
6
+ export * from "./UpdateUserRequestData.mjs";
7
+ export * from "./UpdateUserRequestDataUnion.mjs";
5
8
  export * from "./UserRequestAttributes.mjs";
6
9
  export * from "./UserRequestData.mjs";
7
10
  export * from "./UserRequestDataUnion.mjs";
8
11
  export * from "./UserResponseNoData.mjs";
12
+ export * from "./UserResponseObject.mjs";
9
13
  export * from "./UserResponseUnionNoData.mjs";
@@ -2,8 +2,12 @@ export * from "./CreateUsersMultiStatusResponse.mjs";
2
2
  export * from "./CreateUsersObject.mjs";
3
3
  export * from "./DeleteUserResponseObject.mjs";
4
4
  export * from "./UpdateUserObject.mjs";
5
+ export * from "./UpdateUserRequestAttributes.mjs";
6
+ export * from "./UpdateUserRequestData.mjs";
7
+ export * from "./UpdateUserRequestDataUnion.mjs";
5
8
  export * from "./UserRequestAttributes.mjs";
6
9
  export * from "./UserRequestData.mjs";
7
10
  export * from "./UserRequestDataUnion.mjs";
8
11
  export * from "./UserResponseNoData.mjs";
12
+ export * from "./UserResponseObject.mjs";
9
13
  export * from "./UserResponseUnionNoData.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "6.0.0";
1
+ export declare const SDK_VERSION = "8.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "6.0.0";
1
+ export const SDK_VERSION = "8.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "6.0.0",
3
+ "version": "8.0.0",
4
4
  "private": false,
5
5
  "repository": "github:KardFinancial/kard-node-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -938,7 +938,12 @@ await client.users.create("organization-123", {
938
938
  id: "1234567890",
939
939
  attributes: {
940
940
  zipCode: "11238",
941
- enrolledRewards: ["CARDLINKED"]
941
+ enrolledRewards: ["CARDLINKED"],
942
+ email: "user@example.com",
943
+ hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
944
+ phoneNumber: "+14155552671",
945
+ birthYear: "1990",
946
+ historicalTransactionsSent: true
942
947
  }
943
948
  }]
944
949
  });
@@ -985,7 +990,7 @@ await client.users.create("organization-123", {
985
990
  </dl>
986
991
  </details>
987
992
 
988
- <details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">update</a>(organizationId, userId, { ...params }) -> KardApi.UpdateUserObject</code></summary>
993
+ <details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">update</a>(organizationId, userId, { ...params }) -> KardApi.UserResponseObject</code></summary>
989
994
  <dl>
990
995
  <dd>
991
996
 
@@ -1020,7 +1025,11 @@ await client.users.update("organization-123", "user-123", {
1020
1025
  id: "1234567890",
1021
1026
  attributes: {
1022
1027
  zipCode: "11238",
1023
- enrolledRewards: ["CARDLINKED"]
1028
+ enrolledRewards: ["CARDLINKED"],
1029
+ email: "user@example.com",
1030
+ hashedEmail: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3e2d8a5b76e45a1d4c4e2e3a1",
1031
+ phoneNumber: "+14155552671",
1032
+ birthYear: "1990"
1024
1033
  }
1025
1034
  }
1026
1035
  });
@@ -1148,7 +1157,7 @@ await client.users.delete("organization-123", "user-123");
1148
1157
  </dl>
1149
1158
  </details>
1150
1159
 
1151
- <details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">get</a>(organizationId, userId) -> KardApi.UpdateUserObject</code></summary>
1160
+ <details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">get</a>(organizationId, userId) -> KardApi.UserResponseObject</code></summary>
1152
1161
  <dl>
1153
1162
  <dd>
1154
1163
 
@@ -1,10 +0,0 @@
1
- import type * as KardApi from "../../../../../index.js";
2
- /**
3
- * Progress bar label configuration
4
- */
5
- export interface ProgressBarLabel {
6
- /** Text content for the label */
7
- text: string;
8
- /** Position where the label should render */
9
- position: KardApi.users.ProgressBarLabelPosition;
10
- }
@@ -1,6 +0,0 @@
1
- /** Supported progress bar label positions */
2
- export declare const ProgressBarLabelPosition: {
3
- readonly Left: "LEFT";
4
- readonly Right: "RIGHT";
5
- };
6
- export type ProgressBarLabelPosition = (typeof ProgressBarLabelPosition)[keyof typeof ProgressBarLabelPosition];
@@ -1,10 +0,0 @@
1
- import type * as KardApi from "../../../../../index.mjs";
2
- /**
3
- * Progress bar label configuration
4
- */
5
- export interface ProgressBarLabel {
6
- /** Text content for the label */
7
- text: string;
8
- /** Position where the label should render */
9
- position: KardApi.users.ProgressBarLabelPosition;
10
- }
@@ -1,6 +0,0 @@
1
- /** Supported progress bar label positions */
2
- export declare const ProgressBarLabelPosition: {
3
- readonly Left: "LEFT";
4
- readonly Right: "RIGHT";
5
- };
6
- export type ProgressBarLabelPosition = (typeof ProgressBarLabelPosition)[keyof typeof ProgressBarLabelPosition];
@@ -1,6 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- /** Supported progress bar label positions */
3
- export const ProgressBarLabelPosition = {
4
- Left: "LEFT",
5
- Right: "RIGHT",
6
- };