@kard-financial/sdk 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +28 -1
- package/dist/cjs/api/resources/transactions/client/Client.js +28 -1
- package/dist/cjs/api/resources/transactions/types/CoreMerchant.d.ts +4 -0
- package/dist/cjs/api/resources/transactions/types/CoreMerchant.js +3 -0
- package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +25 -0
- package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.js +3 -0
- package/dist/cjs/api/resources/transactions/types/CoreTransactionRequest.d.ts +6 -0
- package/dist/cjs/api/resources/transactions/types/CoreTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/transactions/types/FinancialInstitution.d.ts +6 -0
- package/dist/cjs/api/resources/transactions/types/FinancialInstitution.js +3 -0
- package/dist/cjs/api/resources/transactions/types/MatchedTransactionsAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/transactions/types/Transactions.d.ts +4 -1
- package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +3 -3
- package/dist/cjs/api/resources/transactions/types/TransactionsRequestBody.d.ts +27 -0
- package/dist/cjs/api/resources/transactions/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/transactions/types/index.js +4 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/Client.d.ts +19 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +95 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/attributions/client/index.js +15 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.d.ts +11 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.js +3 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.d.ts +5 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.js +8 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncluded.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncluded.js +3 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.ts +20 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.js +3 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.d.ts +6 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.js +3 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseData.d.ts +6 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseData.js +3 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/EventCode.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/EventCode.js +1 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/OfferMedium.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/OfferMedium.js +1 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/index.js +5 -0
- package/dist/cjs/api/resources/users/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/index.js +4 -3
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +2 -4
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +20 -6
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.d.ts +6 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.js +9 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.d.ts +9 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.js +12 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.d.ts +10 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.js +3 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/OfferCommonFields.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.d.ts +16 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.js +3 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/users/resources/rewards/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/transactions/client/Client.d.mts +28 -1
- package/dist/esm/api/resources/transactions/client/Client.mjs +28 -1
- package/dist/esm/api/resources/transactions/types/CoreMerchant.d.mts +4 -0
- package/dist/esm/api/resources/transactions/types/CoreMerchant.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +25 -0
- package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/CoreTransactionRequest.d.mts +6 -0
- package/dist/esm/api/resources/transactions/types/CoreTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/FinancialInstitution.d.mts +6 -0
- package/dist/esm/api/resources/transactions/types/FinancialInstitution.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/MatchedTransactionsAttributes.d.mts +1 -1
- package/dist/esm/api/resources/transactions/types/Transactions.d.mts +4 -1
- package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +3 -3
- package/dist/esm/api/resources/transactions/types/TransactionsRequestBody.d.mts +27 -0
- package/dist/esm/api/resources/transactions/types/index.d.mts +4 -0
- package/dist/esm/api/resources/transactions/types/index.mjs +4 -0
- package/dist/esm/api/resources/users/resources/attributions/client/Client.d.mts +19 -0
- package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +95 -0
- package/dist/esm/api/resources/users/resources/attributions/client/index.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/attributions/client/index.mjs +1 -1
- package/dist/esm/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.d.mts +11 -0
- package/dist/esm/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.mjs +2 -0
- package/dist/esm/api/resources/users/resources/attributions/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/attributions/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.d.mts +5 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.mjs +5 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncluded.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncluded.mjs +2 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.mts +20 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.mjs +2 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.d.mts +6 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.mjs +2 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseData.d.mts +6 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseData.mjs +2 -0
- package/dist/esm/api/resources/users/resources/attributions/types/EventCode.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/attributions/types/EventCode.mjs +1 -0
- package/dist/esm/api/resources/users/resources/attributions/types/OfferMedium.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/attributions/types/OfferMedium.mjs +1 -0
- package/dist/esm/api/resources/users/resources/attributions/types/index.d.mts +5 -0
- package/dist/esm/api/resources/users/resources/attributions/types/index.mjs +5 -0
- package/dist/esm/api/resources/users/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +2 -4
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +20 -6
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.d.mts +6 -0
- package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.mjs +6 -0
- package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.d.mts +9 -0
- package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.mjs +9 -0
- package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.d.mts +10 -0
- package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.mjs +2 -0
- package/dist/esm/api/resources/users/resources/rewards/types/OfferCommonFields.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.d.mts +16 -0
- package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.mjs +2 -0
- package/dist/esm/api/resources/users/resources/rewards/types/index.d.mts +4 -0
- package/dist/esm/api/resources/users/resources/rewards/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 +92 -5
package/reference.md
CHANGED
|
@@ -448,7 +448,8 @@ await client.ping.ping();
|
|
|
448
448
|
Call this endpoint to send all transactions made by all your enrolled users in your rewards program. The request body will depend on the transaction type.<br/>
|
|
449
449
|
Please use the correct type when calling the endpoint:
|
|
450
450
|
- `transaction`: These incoming transactions will be processed and matched by the Kard system. Learn more about the [Transaction CLO Matching](https://github.com/kard-financial/kard-postman#c-transaction-clo-matching) flow here.
|
|
451
|
-
- `matchedTransaction`: For pre-matched transactions that need validation on match by the Kard system
|
|
451
|
+
- `matchedTransaction`: For pre-matched transactions that need validation on match by the Kard system.
|
|
452
|
+
- `coreTransaction`: For transactions from core banking systems with limited card-level data.<br/>
|
|
452
453
|
|
|
453
454
|
<b>Required scopes:</b> `transaction:write`<br/>
|
|
454
455
|
<b>Note:</b> `Maximum of 500 transactions can be created per request`.
|
|
@@ -1236,6 +1237,94 @@ await client.users.attributions.create("organization-123", "user-123", {
|
|
|
1236
1237
|
</dl>
|
|
1237
1238
|
|
|
1238
1239
|
|
|
1240
|
+
</dd>
|
|
1241
|
+
</dl>
|
|
1242
|
+
</details>
|
|
1243
|
+
|
|
1244
|
+
<details><summary><code>client.users.attributions.<a href="/src/api/resources/users/resources/attributions/client/Client.ts">activate</a>(organizationId, userId, offerId, { ...params }) -> KardApi.ActivateOfferResponse</code></summary>
|
|
1245
|
+
<dl>
|
|
1246
|
+
<dd>
|
|
1247
|
+
|
|
1248
|
+
#### 📝 Description
|
|
1249
|
+
|
|
1250
|
+
<dl>
|
|
1251
|
+
<dd>
|
|
1252
|
+
|
|
1253
|
+
<dl>
|
|
1254
|
+
<dd>
|
|
1255
|
+
|
|
1256
|
+
Record when a user activates an offer. Creates an attribution event with eventCode=ACTIVATE and medium=CTA.
|
|
1257
|
+
Optionally include the offer data by passing `include=offer`.
|
|
1258
|
+
</dd>
|
|
1259
|
+
</dl>
|
|
1260
|
+
</dd>
|
|
1261
|
+
</dl>
|
|
1262
|
+
|
|
1263
|
+
#### 🔌 Usage
|
|
1264
|
+
|
|
1265
|
+
<dl>
|
|
1266
|
+
<dd>
|
|
1267
|
+
|
|
1268
|
+
<dl>
|
|
1269
|
+
<dd>
|
|
1270
|
+
|
|
1271
|
+
```typescript
|
|
1272
|
+
await client.users.attributions.activate("organization-123", "user-123", "offer-456");
|
|
1273
|
+
|
|
1274
|
+
```
|
|
1275
|
+
</dd>
|
|
1276
|
+
</dl>
|
|
1277
|
+
</dd>
|
|
1278
|
+
</dl>
|
|
1279
|
+
|
|
1280
|
+
#### ⚙️ Parameters
|
|
1281
|
+
|
|
1282
|
+
<dl>
|
|
1283
|
+
<dd>
|
|
1284
|
+
|
|
1285
|
+
<dl>
|
|
1286
|
+
<dd>
|
|
1287
|
+
|
|
1288
|
+
**organizationId:** `KardApi.OrganizationId`
|
|
1289
|
+
|
|
1290
|
+
</dd>
|
|
1291
|
+
</dl>
|
|
1292
|
+
|
|
1293
|
+
<dl>
|
|
1294
|
+
<dd>
|
|
1295
|
+
|
|
1296
|
+
**userId:** `KardApi.UserId`
|
|
1297
|
+
|
|
1298
|
+
</dd>
|
|
1299
|
+
</dl>
|
|
1300
|
+
|
|
1301
|
+
<dl>
|
|
1302
|
+
<dd>
|
|
1303
|
+
|
|
1304
|
+
**offerId:** `string` — The unique identifier of the offer being activated
|
|
1305
|
+
|
|
1306
|
+
</dd>
|
|
1307
|
+
</dl>
|
|
1308
|
+
|
|
1309
|
+
<dl>
|
|
1310
|
+
<dd>
|
|
1311
|
+
|
|
1312
|
+
**request:** `KardApi.users.ActivateOfferRequest`
|
|
1313
|
+
|
|
1314
|
+
</dd>
|
|
1315
|
+
</dl>
|
|
1316
|
+
|
|
1317
|
+
<dl>
|
|
1318
|
+
<dd>
|
|
1319
|
+
|
|
1320
|
+
**requestOptions:** `AttributionsClient.RequestOptions`
|
|
1321
|
+
|
|
1322
|
+
</dd>
|
|
1323
|
+
</dl>
|
|
1324
|
+
</dd>
|
|
1325
|
+
</dl>
|
|
1326
|
+
|
|
1327
|
+
|
|
1239
1328
|
</dd>
|
|
1240
1329
|
</dl>
|
|
1241
1330
|
</details>
|
|
@@ -1327,8 +1416,7 @@ await client.users.auth.getWebViewToken("organization-123", "user-123");
|
|
|
1327
1416
|
|
|
1328
1417
|
Retrieve national brand offers that a specified user is eligible for. Call this endpoint to build out your
|
|
1329
1418
|
[targeted offers UX experience](/2024-10-01/api/getting-started#b-discover-a-lapsed-customer-clo). Local offers details
|
|
1330
|
-
can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations)
|
|
1331
|
-
`includeLocal` query parameter.<br/>
|
|
1419
|
+
can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations).<br/>
|
|
1332
1420
|
<b>Required scopes:</b> `rewards:read`
|
|
1333
1421
|
</dd>
|
|
1334
1422
|
</dl>
|
|
@@ -1412,8 +1500,7 @@ await client.users.rewards.offers("organization-123", "user-123", {
|
|
|
1412
1500
|
<dl>
|
|
1413
1501
|
<dd>
|
|
1414
1502
|
|
|
1415
|
-
Retrieve national and local geographic locations that a specified user has eligible in-store offers at.
|
|
1416
|
-
include local locations, add the `includeLocal` query parameter to your api call. Use this endpoint to build
|
|
1503
|
+
Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
|
|
1417
1504
|
out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
|
|
1418
1505
|
that Longitude and Latitude fields are prioritized over State, City and Zipcode and are the recommended search
|
|
1419
1506
|
pattern.<br/>
|