@kard-financial/sdk 7.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.
- package/README.md +6 -1
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/users/client/Client.d.ts +13 -4
- package/dist/cjs/api/resources/users/client/Client.js +11 -2
- package/dist/cjs/api/resources/users/types/CreateUsersObject.d.ts +6 -1
- package/dist/cjs/api/resources/users/types/UpdateUserObject.d.ts +6 -2
- package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.d.ts +15 -0
- package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.js +3 -0
- package/dist/cjs/api/resources/users/types/UpdateUserRequestData.d.ts +5 -0
- package/dist/cjs/api/resources/users/types/UpdateUserRequestData.js +3 -0
- package/dist/cjs/api/resources/users/types/UpdateUserRequestDataUnion.d.ts +7 -0
- package/dist/cjs/api/resources/users/types/UpdateUserRequestDataUnion.js +3 -0
- package/dist/cjs/api/resources/users/types/UserRequestAttributes.d.ts +2 -0
- package/dist/cjs/api/resources/users/types/UserResponseObject.d.ts +22 -0
- package/dist/cjs/api/resources/users/types/UserResponseObject.js +3 -0
- package/dist/cjs/api/resources/users/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/users/types/index.js +4 -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/users/client/Client.d.mts +13 -4
- package/dist/esm/api/resources/users/client/Client.mjs +11 -2
- package/dist/esm/api/resources/users/types/CreateUsersObject.d.mts +6 -1
- package/dist/esm/api/resources/users/types/UpdateUserObject.d.mts +6 -2
- package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.d.mts +15 -0
- package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.mjs +2 -0
- package/dist/esm/api/resources/users/types/UpdateUserRequestData.d.mts +5 -0
- package/dist/esm/api/resources/users/types/UpdateUserRequestData.mjs +2 -0
- package/dist/esm/api/resources/users/types/UpdateUserRequestDataUnion.d.mts +7 -0
- package/dist/esm/api/resources/users/types/UpdateUserRequestDataUnion.mjs +2 -0
- package/dist/esm/api/resources/users/types/UserRequestAttributes.d.mts +2 -0
- package/dist/esm/api/resources/users/types/UserResponseObject.d.mts +22 -0
- package/dist/esm/api/resources/users/types/UserResponseObject.mjs +2 -0
- package/dist/esm/api/resources/users/types/index.d.mts +4 -0
- package/dist/esm/api/resources/users/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +13 -4
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
|
});
|
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": "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.
|
|
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.
|
|
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
|
* })
|
|
@@ -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.
|
|
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,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,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
|
+
}
|
|
@@ -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);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "8.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": "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.
|
|
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.
|
|
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
|
* })
|
|
@@ -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.
|
|
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,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,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
|
+
}
|
|
@@ -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";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "8.0.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "8.0.0";
|
package/package.json
CHANGED
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.
|
|
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.
|
|
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
|
|