@kard-financial/sdk 0.0.1 → 0.0.55247
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 +1 -1
- package/dist/cjs/api/resources/attributions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/attributions/client/Client.js +2 -2
- package/dist/cjs/api/resources/eligibility/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/eligibility/client/Client.js +4 -4
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.js +2 -2
- package/dist/cjs/api/resources/notifications/types/FailedTransactionRelationships.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +12 -0
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/transactions/client/Client.js +3 -3
- package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/users/client/Client.js +8 -8
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/resources/attributions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/attributions/client/Client.mjs +2 -2
- package/dist/esm/api/resources/eligibility/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/eligibility/client/Client.mjs +4 -4
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.mjs +2 -2
- package/dist/esm/api/resources/notifications/types/FailedTransactionRelationships.d.mts +1 -0
- package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +12 -0
- package/dist/esm/api/resources/transactions/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/transactions/client/Client.mjs +3 -3
- package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/users/client/Client.mjs +8 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +9 -9
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Instantiate and use the client with the following:
|
|
|
23
23
|
import { KardApiClient } from "@kard-financial/sdk";
|
|
24
24
|
|
|
25
25
|
const client = new KardApiClient({ token: "YOUR_TOKEN" });
|
|
26
|
-
await client.attributions.createAttributionEvents("
|
|
26
|
+
await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
27
27
|
data: [
|
|
28
28
|
{
|
|
29
29
|
type: "offerAttribution",
|
|
@@ -40,7 +40,7 @@ export declare class Attributions {
|
|
|
40
40
|
* @throws {@link KardApi.InvalidRequest}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.attributions.createAttributionEvents("
|
|
43
|
+
* await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
44
44
|
* data: [{
|
|
45
45
|
* type: "offerAttribution",
|
|
46
46
|
* attributes: {
|
|
@@ -73,7 +73,7 @@ class Attributions {
|
|
|
73
73
|
* @throws {@link KardApi.InvalidRequest}
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
|
-
* await client.attributions.createAttributionEvents("
|
|
76
|
+
* await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
77
77
|
* data: [{
|
|
78
78
|
* type: "offerAttribution",
|
|
79
79
|
* attributes: {
|
|
@@ -102,7 +102,7 @@ class Attributions {
|
|
|
102
102
|
const _response = yield core.fetcher({
|
|
103
103
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/attributions`),
|
|
104
104
|
method: "POST",
|
|
105
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
105
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
106
106
|
contentType: "application/json",
|
|
107
107
|
requestType: "json",
|
|
108
108
|
body: request,
|
|
@@ -43,7 +43,7 @@ export declare class Eligibility {
|
|
|
43
43
|
* @throws {@link KardApi.UnauthorizedError}
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
|
-
* await client.eligibility.getOffersByUser("
|
|
46
|
+
* await client.eligibility.getOffersByUser("{organizationId}", "{userId}", {
|
|
47
47
|
* "page[size]": 1,
|
|
48
48
|
* "filter[isTargeted]": true,
|
|
49
49
|
* sort: "-startDate"
|
|
@@ -71,7 +71,7 @@ export declare class Eligibility {
|
|
|
71
71
|
* @throws {@link KardApi.UnauthorizedError}
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.eligibility.getLocationsByUser("
|
|
74
|
+
* await client.eligibility.getLocationsByUser("{organizationId}", "{userId}", {
|
|
75
75
|
* "page[size]": 1,
|
|
76
76
|
* "filter[latitude]": 39.9419429,
|
|
77
77
|
* "filter[longitude]": -75.1446869,
|
|
@@ -77,7 +77,7 @@ class Eligibility {
|
|
|
77
77
|
* @throws {@link KardApi.UnauthorizedError}
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
80
|
-
* await client.eligibility.getOffersByUser("
|
|
80
|
+
* await client.eligibility.getOffersByUser("{organizationId}", "{userId}", {
|
|
81
81
|
* "page[size]": 1,
|
|
82
82
|
* "filter[isTargeted]": true,
|
|
83
83
|
* sort: "-startDate"
|
|
@@ -128,7 +128,7 @@ class Eligibility {
|
|
|
128
128
|
const _response = yield core.fetcher({
|
|
129
129
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/offers`),
|
|
130
130
|
method: "GET",
|
|
131
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
131
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
132
132
|
contentType: "application/json",
|
|
133
133
|
queryParameters: _queryParams,
|
|
134
134
|
requestType: "json",
|
|
@@ -194,7 +194,7 @@ class Eligibility {
|
|
|
194
194
|
* @throws {@link KardApi.UnauthorizedError}
|
|
195
195
|
*
|
|
196
196
|
* @example
|
|
197
|
-
* await client.eligibility.getLocationsByUser("
|
|
197
|
+
* await client.eligibility.getLocationsByUser("{organizationId}", "{userId}", {
|
|
198
198
|
* "page[size]": 1,
|
|
199
199
|
* "filter[latitude]": 39.9419429,
|
|
200
200
|
* "filter[longitude]": -75.1446869,
|
|
@@ -262,7 +262,7 @@ class Eligibility {
|
|
|
262
262
|
const _response = yield core.fetcher({
|
|
263
263
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/locations`),
|
|
264
264
|
method: "GET",
|
|
265
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
265
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
266
266
|
contentType: "application/json",
|
|
267
267
|
queryParameters: _queryParams,
|
|
268
268
|
requestType: "json",
|
|
@@ -39,7 +39,7 @@ export declare class Notifications {
|
|
|
39
39
|
* @throws {@link KardApi.ConflictError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.notifications.createSubscriptions("
|
|
42
|
+
* await client.notifications.createSubscriptions("{organizationId}", {
|
|
43
43
|
* data: [{
|
|
44
44
|
* type: "subscription",
|
|
45
45
|
* attributes: {
|
|
@@ -72,7 +72,7 @@ class Notifications {
|
|
|
72
72
|
* @throws {@link KardApi.ConflictError}
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
|
-
* await client.notifications.createSubscriptions("
|
|
75
|
+
* await client.notifications.createSubscriptions("{organizationId}", {
|
|
76
76
|
* data: [{
|
|
77
77
|
* type: "subscription",
|
|
78
78
|
* attributes: {
|
|
@@ -92,7 +92,7 @@ class Notifications {
|
|
|
92
92
|
const _response = yield core.fetcher({
|
|
93
93
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/subscriptions`),
|
|
94
94
|
method: "POST",
|
|
95
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
95
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
96
96
|
contentType: "application/json",
|
|
97
97
|
requestType: "json",
|
|
98
98
|
body: request,
|
|
@@ -116,6 +116,12 @@ import * as KardApi from "../../../index.js";
|
|
|
116
116
|
* cardProductId: "card_product_123"
|
|
117
117
|
* },
|
|
118
118
|
* relationships: {
|
|
119
|
+
* merchant: {
|
|
120
|
+
* data: {
|
|
121
|
+
* type: "merchant",
|
|
122
|
+
* id: "merchantId001"
|
|
123
|
+
* }
|
|
124
|
+
* },
|
|
119
125
|
* user: {
|
|
120
126
|
* data: {
|
|
121
127
|
* type: "user",
|
|
@@ -150,6 +156,12 @@ import * as KardApi from "../../../index.js";
|
|
|
150
156
|
* cardProductId: "card_product_123"
|
|
151
157
|
* },
|
|
152
158
|
* relationships: {
|
|
159
|
+
* merchant: {
|
|
160
|
+
* data: {
|
|
161
|
+
* type: "merchant",
|
|
162
|
+
* id: "merchantId001"
|
|
163
|
+
* }
|
|
164
|
+
* },
|
|
153
165
|
* user: {
|
|
154
166
|
* data: {
|
|
155
167
|
* type: "user",
|
|
@@ -45,7 +45,7 @@ export declare class Transactions {
|
|
|
45
45
|
* @throws {@link KardApi.ConflictError}
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
|
-
* await client.transactions.createIncomingTransactions("
|
|
48
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
49
49
|
* data: [{
|
|
50
50
|
* type: "transaction",
|
|
51
51
|
* id: "309rjfoincor3icno3rind093cdow3jciwjdwcm",
|
|
@@ -86,7 +86,7 @@ export declare class Transactions {
|
|
|
86
86
|
* })
|
|
87
87
|
*
|
|
88
88
|
* @example
|
|
89
|
-
* await client.transactions.createIncomingTransactions("
|
|
89
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
90
90
|
* data: [{
|
|
91
91
|
* type: "matchedTransaction",
|
|
92
92
|
* id: "soduinfwoer82498h248h298heo2eic",
|
|
@@ -78,7 +78,7 @@ class Transactions {
|
|
|
78
78
|
* @throws {@link KardApi.ConflictError}
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
|
-
* await client.transactions.createIncomingTransactions("
|
|
81
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
82
82
|
* data: [{
|
|
83
83
|
* type: "transaction",
|
|
84
84
|
* id: "309rjfoincor3icno3rind093cdow3jciwjdwcm",
|
|
@@ -119,7 +119,7 @@ class Transactions {
|
|
|
119
119
|
* })
|
|
120
120
|
*
|
|
121
121
|
* @example
|
|
122
|
-
* await client.transactions.createIncomingTransactions("
|
|
122
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
123
123
|
* data: [{
|
|
124
124
|
* type: "matchedTransaction",
|
|
125
125
|
* id: "soduinfwoer82498h248h298heo2eic",
|
|
@@ -163,7 +163,7 @@ class Transactions {
|
|
|
163
163
|
const _response = yield core.fetcher({
|
|
164
164
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/transactions`),
|
|
165
165
|
method: "POST",
|
|
166
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
166
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
requestType: "json",
|
|
169
169
|
body: request,
|
|
@@ -31,7 +31,7 @@ export interface TransactionsAttributes {
|
|
|
31
31
|
merchant?: KardApi.Merchant;
|
|
32
32
|
/** Whether card was present at time of transaction */
|
|
33
33
|
cardPresence?: string;
|
|
34
|
-
/** PAN entry mode */
|
|
34
|
+
/** PAN entry mode (usually a 2 digit numeric code) */
|
|
35
35
|
panEntryMode?: string;
|
|
36
36
|
/** Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6. */
|
|
37
37
|
cardBIN: string;
|
|
@@ -42,7 +42,7 @@ export declare class Users {
|
|
|
42
42
|
* @throws {@link KardApi.ConflictError}
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
|
-
* await client.users.createUsers("
|
|
45
|
+
* await client.users.createUsers("{organizationId}", {
|
|
46
46
|
* data: [{
|
|
47
47
|
* type: "user",
|
|
48
48
|
* id: "1234567890",
|
|
@@ -71,7 +71,7 @@ export declare class Users {
|
|
|
71
71
|
* @throws {@link KardApi.DoesNotExistError}
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.users.updateUser("
|
|
74
|
+
* await client.users.updateUser("{organizationId}", "{userId}", {
|
|
75
75
|
* data: {
|
|
76
76
|
* type: "user",
|
|
77
77
|
* id: "1234567890",
|
|
@@ -99,7 +99,7 @@ export declare class Users {
|
|
|
99
99
|
* @throws {@link KardApi.DoesNotExistError}
|
|
100
100
|
*
|
|
101
101
|
* @example
|
|
102
|
-
* await client.users.deleteUser("
|
|
102
|
+
* await client.users.deleteUser("{organizationId}", "{userId}")
|
|
103
103
|
*/
|
|
104
104
|
deleteUser(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<KardApi.DeleteUserResponseObject>;
|
|
105
105
|
private __deleteUser;
|
|
@@ -117,7 +117,7 @@ export declare class Users {
|
|
|
117
117
|
* @throws {@link KardApi.DoesNotExistError}
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
|
-
* await client.users.getUserById("
|
|
120
|
+
* await client.users.getUserById("{organizationId}", "{userId}")
|
|
121
121
|
*/
|
|
122
122
|
getUserById(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
|
|
123
123
|
private __getUserById;
|
|
@@ -75,7 +75,7 @@ class Users {
|
|
|
75
75
|
* @throws {@link KardApi.ConflictError}
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
|
-
* await client.users.createUsers("
|
|
78
|
+
* await client.users.createUsers("{organizationId}", {
|
|
79
79
|
* data: [{
|
|
80
80
|
* type: "user",
|
|
81
81
|
* id: "1234567890",
|
|
@@ -95,7 +95,7 @@ class Users {
|
|
|
95
95
|
const _response = yield core.fetcher({
|
|
96
96
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users`),
|
|
97
97
|
method: "POST",
|
|
98
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
98
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
99
99
|
contentType: "application/json",
|
|
100
100
|
requestType: "json",
|
|
101
101
|
body: request,
|
|
@@ -159,7 +159,7 @@ class Users {
|
|
|
159
159
|
* @throws {@link KardApi.DoesNotExistError}
|
|
160
160
|
*
|
|
161
161
|
* @example
|
|
162
|
-
* await client.users.updateUser("
|
|
162
|
+
* await client.users.updateUser("{organizationId}", "{userId}", {
|
|
163
163
|
* data: {
|
|
164
164
|
* type: "user",
|
|
165
165
|
* id: "1234567890",
|
|
@@ -179,7 +179,7 @@ class Users {
|
|
|
179
179
|
const _response = yield core.fetcher({
|
|
180
180
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
181
181
|
method: "PUT",
|
|
182
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
182
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
183
183
|
contentType: "application/json",
|
|
184
184
|
requestType: "json",
|
|
185
185
|
body: request,
|
|
@@ -240,7 +240,7 @@ class Users {
|
|
|
240
240
|
* @throws {@link KardApi.DoesNotExistError}
|
|
241
241
|
*
|
|
242
242
|
* @example
|
|
243
|
-
* await client.users.deleteUser("
|
|
243
|
+
* await client.users.deleteUser("{organizationId}", "{userId}")
|
|
244
244
|
*/
|
|
245
245
|
deleteUser(organizationId, userId, requestOptions) {
|
|
246
246
|
return core.HttpResponsePromise.fromPromise(this.__deleteUser(organizationId, userId, requestOptions));
|
|
@@ -251,7 +251,7 @@ class Users {
|
|
|
251
251
|
const _response = yield core.fetcher({
|
|
252
252
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
253
253
|
method: "DELETE",
|
|
254
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
254
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
255
255
|
contentType: "application/json",
|
|
256
256
|
requestType: "json",
|
|
257
257
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -310,7 +310,7 @@ class Users {
|
|
|
310
310
|
* @throws {@link KardApi.DoesNotExistError}
|
|
311
311
|
*
|
|
312
312
|
* @example
|
|
313
|
-
* await client.users.getUserById("
|
|
313
|
+
* await client.users.getUserById("{organizationId}", "{userId}")
|
|
314
314
|
*/
|
|
315
315
|
getUserById(organizationId, userId, requestOptions) {
|
|
316
316
|
return core.HttpResponsePromise.fromPromise(this.__getUserById(organizationId, userId, requestOptions));
|
|
@@ -321,7 +321,7 @@ class Users {
|
|
|
321
321
|
const _response = yield core.fetcher({
|
|
322
322
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
323
323
|
method: "GET",
|
|
324
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
324
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
325
325
|
contentType: "application/json",
|
|
326
326
|
requestType: "json",
|
|
327
327
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.55247";
|
package/dist/cjs/version.js
CHANGED
|
@@ -40,7 +40,7 @@ export declare class Attributions {
|
|
|
40
40
|
* @throws {@link KardApi.InvalidRequest}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.attributions.createAttributionEvents("
|
|
43
|
+
* await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
44
44
|
* data: [{
|
|
45
45
|
* type: "offerAttribution",
|
|
46
46
|
* attributes: {
|
|
@@ -34,7 +34,7 @@ export class Attributions {
|
|
|
34
34
|
* @throws {@link KardApi.InvalidRequest}
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
|
-
* await client.attributions.createAttributionEvents("
|
|
37
|
+
* await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
38
38
|
* data: [{
|
|
39
39
|
* type: "offerAttribution",
|
|
40
40
|
* attributes: {
|
|
@@ -63,7 +63,7 @@ export class Attributions {
|
|
|
63
63
|
const _response = yield core.fetcher({
|
|
64
64
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/attributions`),
|
|
65
65
|
method: "POST",
|
|
66
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
66
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
requestType: "json",
|
|
69
69
|
body: request,
|
|
@@ -43,7 +43,7 @@ export declare class Eligibility {
|
|
|
43
43
|
* @throws {@link KardApi.UnauthorizedError}
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
|
-
* await client.eligibility.getOffersByUser("
|
|
46
|
+
* await client.eligibility.getOffersByUser("{organizationId}", "{userId}", {
|
|
47
47
|
* "page[size]": 1,
|
|
48
48
|
* "filter[isTargeted]": true,
|
|
49
49
|
* sort: "-startDate"
|
|
@@ -71,7 +71,7 @@ export declare class Eligibility {
|
|
|
71
71
|
* @throws {@link KardApi.UnauthorizedError}
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.eligibility.getLocationsByUser("
|
|
74
|
+
* await client.eligibility.getLocationsByUser("{organizationId}", "{userId}", {
|
|
75
75
|
* "page[size]": 1,
|
|
76
76
|
* "filter[latitude]": 39.9419429,
|
|
77
77
|
* "filter[longitude]": -75.1446869,
|
|
@@ -38,7 +38,7 @@ export class Eligibility {
|
|
|
38
38
|
* @throws {@link KardApi.UnauthorizedError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await client.eligibility.getOffersByUser("
|
|
41
|
+
* await client.eligibility.getOffersByUser("{organizationId}", "{userId}", {
|
|
42
42
|
* "page[size]": 1,
|
|
43
43
|
* "filter[isTargeted]": true,
|
|
44
44
|
* sort: "-startDate"
|
|
@@ -89,7 +89,7 @@ export class Eligibility {
|
|
|
89
89
|
const _response = yield core.fetcher({
|
|
90
90
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/offers`),
|
|
91
91
|
method: "GET",
|
|
92
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
92
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
93
93
|
contentType: "application/json",
|
|
94
94
|
queryParameters: _queryParams,
|
|
95
95
|
requestType: "json",
|
|
@@ -155,7 +155,7 @@ export class Eligibility {
|
|
|
155
155
|
* @throws {@link KardApi.UnauthorizedError}
|
|
156
156
|
*
|
|
157
157
|
* @example
|
|
158
|
-
* await client.eligibility.getLocationsByUser("
|
|
158
|
+
* await client.eligibility.getLocationsByUser("{organizationId}", "{userId}", {
|
|
159
159
|
* "page[size]": 1,
|
|
160
160
|
* "filter[latitude]": 39.9419429,
|
|
161
161
|
* "filter[longitude]": -75.1446869,
|
|
@@ -223,7 +223,7 @@ export class Eligibility {
|
|
|
223
223
|
const _response = yield core.fetcher({
|
|
224
224
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}/locations`),
|
|
225
225
|
method: "GET",
|
|
226
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
226
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
227
227
|
contentType: "application/json",
|
|
228
228
|
queryParameters: _queryParams,
|
|
229
229
|
requestType: "json",
|
|
@@ -39,7 +39,7 @@ export declare class Notifications {
|
|
|
39
39
|
* @throws {@link KardApi.ConflictError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.notifications.createSubscriptions("
|
|
42
|
+
* await client.notifications.createSubscriptions("{organizationId}", {
|
|
43
43
|
* data: [{
|
|
44
44
|
* type: "subscription",
|
|
45
45
|
* attributes: {
|
|
@@ -33,7 +33,7 @@ export class Notifications {
|
|
|
33
33
|
* @throws {@link KardApi.ConflictError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.notifications.createSubscriptions("
|
|
36
|
+
* await client.notifications.createSubscriptions("{organizationId}", {
|
|
37
37
|
* data: [{
|
|
38
38
|
* type: "subscription",
|
|
39
39
|
* attributes: {
|
|
@@ -53,7 +53,7 @@ export class Notifications {
|
|
|
53
53
|
const _response = yield core.fetcher({
|
|
54
54
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/subscriptions`),
|
|
55
55
|
method: "POST",
|
|
56
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
56
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
57
57
|
contentType: "application/json",
|
|
58
58
|
requestType: "json",
|
|
59
59
|
body: request,
|
|
@@ -116,6 +116,12 @@ import * as KardApi from "../../../index.mjs";
|
|
|
116
116
|
* cardProductId: "card_product_123"
|
|
117
117
|
* },
|
|
118
118
|
* relationships: {
|
|
119
|
+
* merchant: {
|
|
120
|
+
* data: {
|
|
121
|
+
* type: "merchant",
|
|
122
|
+
* id: "merchantId001"
|
|
123
|
+
* }
|
|
124
|
+
* },
|
|
119
125
|
* user: {
|
|
120
126
|
* data: {
|
|
121
127
|
* type: "user",
|
|
@@ -150,6 +156,12 @@ import * as KardApi from "../../../index.mjs";
|
|
|
150
156
|
* cardProductId: "card_product_123"
|
|
151
157
|
* },
|
|
152
158
|
* relationships: {
|
|
159
|
+
* merchant: {
|
|
160
|
+
* data: {
|
|
161
|
+
* type: "merchant",
|
|
162
|
+
* id: "merchantId001"
|
|
163
|
+
* }
|
|
164
|
+
* },
|
|
153
165
|
* user: {
|
|
154
166
|
* data: {
|
|
155
167
|
* type: "user",
|
|
@@ -45,7 +45,7 @@ export declare class Transactions {
|
|
|
45
45
|
* @throws {@link KardApi.ConflictError}
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
|
-
* await client.transactions.createIncomingTransactions("
|
|
48
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
49
49
|
* data: [{
|
|
50
50
|
* type: "transaction",
|
|
51
51
|
* id: "309rjfoincor3icno3rind093cdow3jciwjdwcm",
|
|
@@ -86,7 +86,7 @@ export declare class Transactions {
|
|
|
86
86
|
* })
|
|
87
87
|
*
|
|
88
88
|
* @example
|
|
89
|
-
* await client.transactions.createIncomingTransactions("
|
|
89
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
90
90
|
* data: [{
|
|
91
91
|
* type: "matchedTransaction",
|
|
92
92
|
* id: "soduinfwoer82498h248h298heo2eic",
|
|
@@ -39,7 +39,7 @@ export class Transactions {
|
|
|
39
39
|
* @throws {@link KardApi.ConflictError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.transactions.createIncomingTransactions("
|
|
42
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
43
43
|
* data: [{
|
|
44
44
|
* type: "transaction",
|
|
45
45
|
* id: "309rjfoincor3icno3rind093cdow3jciwjdwcm",
|
|
@@ -80,7 +80,7 @@ export class Transactions {
|
|
|
80
80
|
* })
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
|
-
* await client.transactions.createIncomingTransactions("
|
|
83
|
+
* await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
84
84
|
* data: [{
|
|
85
85
|
* type: "matchedTransaction",
|
|
86
86
|
* id: "soduinfwoer82498h248h298heo2eic",
|
|
@@ -124,7 +124,7 @@ export class Transactions {
|
|
|
124
124
|
const _response = yield core.fetcher({
|
|
125
125
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/transactions`),
|
|
126
126
|
method: "POST",
|
|
127
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
127
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
128
128
|
contentType: "application/json",
|
|
129
129
|
requestType: "json",
|
|
130
130
|
body: request,
|
|
@@ -31,7 +31,7 @@ export interface TransactionsAttributes {
|
|
|
31
31
|
merchant?: KardApi.Merchant;
|
|
32
32
|
/** Whether card was present at time of transaction */
|
|
33
33
|
cardPresence?: string;
|
|
34
|
-
/** PAN entry mode */
|
|
34
|
+
/** PAN entry mode (usually a 2 digit numeric code) */
|
|
35
35
|
panEntryMode?: string;
|
|
36
36
|
/** Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6. */
|
|
37
37
|
cardBIN: string;
|
|
@@ -42,7 +42,7 @@ export declare class Users {
|
|
|
42
42
|
* @throws {@link KardApi.ConflictError}
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
|
-
* await client.users.createUsers("
|
|
45
|
+
* await client.users.createUsers("{organizationId}", {
|
|
46
46
|
* data: [{
|
|
47
47
|
* type: "user",
|
|
48
48
|
* id: "1234567890",
|
|
@@ -71,7 +71,7 @@ export declare class Users {
|
|
|
71
71
|
* @throws {@link KardApi.DoesNotExistError}
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.users.updateUser("
|
|
74
|
+
* await client.users.updateUser("{organizationId}", "{userId}", {
|
|
75
75
|
* data: {
|
|
76
76
|
* type: "user",
|
|
77
77
|
* id: "1234567890",
|
|
@@ -99,7 +99,7 @@ export declare class Users {
|
|
|
99
99
|
* @throws {@link KardApi.DoesNotExistError}
|
|
100
100
|
*
|
|
101
101
|
* @example
|
|
102
|
-
* await client.users.deleteUser("
|
|
102
|
+
* await client.users.deleteUser("{organizationId}", "{userId}")
|
|
103
103
|
*/
|
|
104
104
|
deleteUser(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<KardApi.DeleteUserResponseObject>;
|
|
105
105
|
private __deleteUser;
|
|
@@ -117,7 +117,7 @@ export declare class Users {
|
|
|
117
117
|
* @throws {@link KardApi.DoesNotExistError}
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
|
-
* await client.users.getUserById("
|
|
120
|
+
* await client.users.getUserById("{organizationId}", "{userId}")
|
|
121
121
|
*/
|
|
122
122
|
getUserById(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, requestOptions?: Users.RequestOptions): core.HttpResponsePromise<KardApi.UpdateUserObject>;
|
|
123
123
|
private __getUserById;
|
|
@@ -36,7 +36,7 @@ export class Users {
|
|
|
36
36
|
* @throws {@link KardApi.ConflictError}
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
|
-
* await client.users.createUsers("
|
|
39
|
+
* await client.users.createUsers("{organizationId}", {
|
|
40
40
|
* data: [{
|
|
41
41
|
* type: "user",
|
|
42
42
|
* id: "1234567890",
|
|
@@ -56,7 +56,7 @@ export class Users {
|
|
|
56
56
|
const _response = yield core.fetcher({
|
|
57
57
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users`),
|
|
58
58
|
method: "POST",
|
|
59
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
59
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
60
60
|
contentType: "application/json",
|
|
61
61
|
requestType: "json",
|
|
62
62
|
body: request,
|
|
@@ -120,7 +120,7 @@ export class Users {
|
|
|
120
120
|
* @throws {@link KardApi.DoesNotExistError}
|
|
121
121
|
*
|
|
122
122
|
* @example
|
|
123
|
-
* await client.users.updateUser("
|
|
123
|
+
* await client.users.updateUser("{organizationId}", "{userId}", {
|
|
124
124
|
* data: {
|
|
125
125
|
* type: "user",
|
|
126
126
|
* id: "1234567890",
|
|
@@ -140,7 +140,7 @@ export class Users {
|
|
|
140
140
|
const _response = yield core.fetcher({
|
|
141
141
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
142
142
|
method: "PUT",
|
|
143
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
143
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
144
144
|
contentType: "application/json",
|
|
145
145
|
requestType: "json",
|
|
146
146
|
body: request,
|
|
@@ -201,7 +201,7 @@ export class Users {
|
|
|
201
201
|
* @throws {@link KardApi.DoesNotExistError}
|
|
202
202
|
*
|
|
203
203
|
* @example
|
|
204
|
-
* await client.users.deleteUser("
|
|
204
|
+
* await client.users.deleteUser("{organizationId}", "{userId}")
|
|
205
205
|
*/
|
|
206
206
|
deleteUser(organizationId, userId, requestOptions) {
|
|
207
207
|
return core.HttpResponsePromise.fromPromise(this.__deleteUser(organizationId, userId, requestOptions));
|
|
@@ -212,7 +212,7 @@ export class Users {
|
|
|
212
212
|
const _response = yield core.fetcher({
|
|
213
213
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
214
214
|
method: "DELETE",
|
|
215
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
215
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
216
216
|
contentType: "application/json",
|
|
217
217
|
requestType: "json",
|
|
218
218
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -271,7 +271,7 @@ export class Users {
|
|
|
271
271
|
* @throws {@link KardApi.DoesNotExistError}
|
|
272
272
|
*
|
|
273
273
|
* @example
|
|
274
|
-
* await client.users.getUserById("
|
|
274
|
+
* await client.users.getUserById("{organizationId}", "{userId}")
|
|
275
275
|
*/
|
|
276
276
|
getUserById(organizationId, userId, requestOptions) {
|
|
277
277
|
return core.HttpResponsePromise.fromPromise(this.__getUserById(organizationId, userId, requestOptions));
|
|
@@ -282,7 +282,7 @@ export class Users {
|
|
|
282
282
|
const _response = yield core.fetcher({
|
|
283
283
|
url: urlJoin((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.KardApiEnvironment.Production, `/v2/issuers/${encodeURIComponent(organizationId)}/users/${encodeURIComponent(userId)}`),
|
|
284
284
|
method: "GET",
|
|
285
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.
|
|
285
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@kard-financial/sdk", "X-Fern-SDK-Version": "0.0.55247", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
286
286
|
contentType: "application/json",
|
|
287
287
|
requestType: "json",
|
|
288
288
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.55247";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.55247";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -32,7 +32,7 @@ Call this endpoint to send attribution events made by a single enrolled user for
|
|
|
32
32
|
<dd>
|
|
33
33
|
|
|
34
34
|
```typescript
|
|
35
|
-
await client.attributions.createAttributionEvents("
|
|
35
|
+
await client.attributions.createAttributionEvents("{organizationId}", "{userId}", {
|
|
36
36
|
data: [
|
|
37
37
|
{
|
|
38
38
|
type: "offerAttribution",
|
|
@@ -138,7 +138,7 @@ can be found by calling the [Get Eligible Locations](/2024-10-01/api/eligibility
|
|
|
138
138
|
<dd>
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
|
-
await client.eligibility.getOffersByUser("
|
|
141
|
+
await client.eligibility.getOffersByUser("{organizationId}", "{userId}", {
|
|
142
142
|
"page[size]": 1,
|
|
143
143
|
"filter[isTargeted]": true,
|
|
144
144
|
sort: "-startDate",
|
|
@@ -227,7 +227,7 @@ pattern.<br/>
|
|
|
227
227
|
<dd>
|
|
228
228
|
|
|
229
229
|
```typescript
|
|
230
|
-
await client.eligibility.getLocationsByUser("
|
|
230
|
+
await client.eligibility.getLocationsByUser("{organizationId}", "{userId}", {
|
|
231
231
|
"page[size]": 1,
|
|
232
232
|
"filter[latitude]": 39.9419429,
|
|
233
233
|
"filter[longitude]": -75.1446869,
|
|
@@ -315,7 +315,7 @@ Call this endpoint to subscribe to notification events.<br/>
|
|
|
315
315
|
<dd>
|
|
316
316
|
|
|
317
317
|
```typescript
|
|
318
|
-
await client.notifications.createSubscriptions("
|
|
318
|
+
await client.notifications.createSubscriptions("{organizationId}", {
|
|
319
319
|
data: [
|
|
320
320
|
{
|
|
321
321
|
type: "subscription",
|
|
@@ -406,7 +406,7 @@ Please use the correct type when calling the endpoint:
|
|
|
406
406
|
<dd>
|
|
407
407
|
|
|
408
408
|
```typescript
|
|
409
|
-
await client.transactions.createIncomingTransactions("
|
|
409
|
+
await client.transactions.createIncomingTransactions("{organizationId}", {
|
|
410
410
|
data: [
|
|
411
411
|
{
|
|
412
412
|
type: "transaction",
|
|
@@ -522,7 +522,7 @@ Call this endpoint to enroll a specified user into your rewards program.<br/>
|
|
|
522
522
|
<dd>
|
|
523
523
|
|
|
524
524
|
```typescript
|
|
525
|
-
await client.users.createUsers("
|
|
525
|
+
await client.users.createUsers("{organizationId}", {
|
|
526
526
|
data: [
|
|
527
527
|
{
|
|
528
528
|
type: "user",
|
|
@@ -606,7 +606,7 @@ Call this endpoint to update the details on a specified user.<br/>
|
|
|
606
606
|
<dd>
|
|
607
607
|
|
|
608
608
|
```typescript
|
|
609
|
-
await client.users.updateUser("
|
|
609
|
+
await client.users.updateUser("{organizationId}", "{userId}", {
|
|
610
610
|
data: {
|
|
611
611
|
type: "user",
|
|
612
612
|
id: "1234567890",
|
|
@@ -696,7 +696,7 @@ Call this endpoint to delete a specified enrolled user from the rewards program
|
|
|
696
696
|
<dd>
|
|
697
697
|
|
|
698
698
|
```typescript
|
|
699
|
-
await client.users.deleteUser("
|
|
699
|
+
await client.users.deleteUser("{organizationId}", "{userId}");
|
|
700
700
|
```
|
|
701
701
|
|
|
702
702
|
</dd>
|
|
@@ -769,7 +769,7 @@ Call this endpoint to fetch the details on a specified user.<br/>
|
|
|
769
769
|
<dd>
|
|
770
770
|
|
|
771
771
|
```typescript
|
|
772
|
-
await client.users.getUserById("
|
|
772
|
+
await client.users.getUserById("{organizationId}", "{userId}");
|
|
773
773
|
```
|
|
774
774
|
|
|
775
775
|
</dd>
|