@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.
Files changed (122) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/transactions/client/Client.d.ts +28 -1
  3. package/dist/cjs/api/resources/transactions/client/Client.js +28 -1
  4. package/dist/cjs/api/resources/transactions/types/CoreMerchant.d.ts +4 -0
  5. package/dist/cjs/api/resources/transactions/types/CoreMerchant.js +3 -0
  6. package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +25 -0
  7. package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.js +3 -0
  8. package/dist/cjs/api/resources/transactions/types/CoreTransactionRequest.d.ts +6 -0
  9. package/dist/cjs/api/resources/transactions/types/CoreTransactionRequest.js +3 -0
  10. package/dist/cjs/api/resources/transactions/types/FinancialInstitution.d.ts +6 -0
  11. package/dist/cjs/api/resources/transactions/types/FinancialInstitution.js +3 -0
  12. package/dist/cjs/api/resources/transactions/types/MatchedTransactionsAttributes.d.ts +1 -1
  13. package/dist/cjs/api/resources/transactions/types/Transactions.d.ts +4 -1
  14. package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +3 -3
  15. package/dist/cjs/api/resources/transactions/types/TransactionsRequestBody.d.ts +27 -0
  16. package/dist/cjs/api/resources/transactions/types/index.d.ts +4 -0
  17. package/dist/cjs/api/resources/transactions/types/index.js +4 -0
  18. package/dist/cjs/api/resources/users/resources/attributions/client/Client.d.ts +19 -0
  19. package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +95 -0
  20. package/dist/cjs/api/resources/users/resources/attributions/client/index.d.ts +1 -1
  21. package/dist/cjs/api/resources/users/resources/attributions/client/index.js +15 -0
  22. package/dist/cjs/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.d.ts +11 -0
  23. package/dist/cjs/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.js +3 -0
  24. package/dist/cjs/api/resources/users/resources/attributions/client/requests/index.d.ts +1 -0
  25. package/dist/cjs/api/resources/users/resources/attributions/client/requests/index.js +2 -0
  26. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.d.ts +5 -0
  27. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.js +8 -0
  28. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncluded.d.ts +2 -0
  29. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferIncluded.js +3 -0
  30. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.ts +20 -0
  31. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.js +3 -0
  32. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.d.ts +6 -0
  33. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.js +3 -0
  34. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseData.d.ts +6 -0
  35. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponseData.js +3 -0
  36. package/dist/cjs/api/resources/users/resources/attributions/types/EventCode.d.ts +1 -0
  37. package/dist/cjs/api/resources/users/resources/attributions/types/EventCode.js +1 -0
  38. package/dist/cjs/api/resources/users/resources/attributions/types/OfferMedium.d.ts +1 -0
  39. package/dist/cjs/api/resources/users/resources/attributions/types/OfferMedium.js +1 -0
  40. package/dist/cjs/api/resources/users/resources/attributions/types/index.d.ts +5 -0
  41. package/dist/cjs/api/resources/users/resources/attributions/types/index.js +5 -0
  42. package/dist/cjs/api/resources/users/resources/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/users/resources/index.js +4 -3
  44. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +2 -4
  45. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +20 -6
  46. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.ts +2 -0
  47. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.ts +2 -0
  48. package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.d.ts +6 -0
  49. package/dist/cjs/api/resources/users/resources/rewards/types/ButtonStyle.js +9 -0
  50. package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.d.ts +9 -0
  51. package/dist/cjs/api/resources/users/resources/rewards/types/ComponentType.js +12 -0
  52. package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.d.ts +10 -0
  53. package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.js +3 -0
  54. package/dist/cjs/api/resources/users/resources/rewards/types/OfferCommonFields.d.ts +2 -0
  55. package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.d.ts +16 -0
  56. package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.js +3 -0
  57. package/dist/cjs/api/resources/users/resources/rewards/types/index.d.ts +4 -0
  58. package/dist/cjs/api/resources/users/resources/rewards/types/index.js +4 -0
  59. package/dist/cjs/version.d.ts +1 -1
  60. package/dist/cjs/version.js +1 -1
  61. package/dist/esm/BaseClient.mjs +2 -2
  62. package/dist/esm/api/resources/transactions/client/Client.d.mts +28 -1
  63. package/dist/esm/api/resources/transactions/client/Client.mjs +28 -1
  64. package/dist/esm/api/resources/transactions/types/CoreMerchant.d.mts +4 -0
  65. package/dist/esm/api/resources/transactions/types/CoreMerchant.mjs +2 -0
  66. package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +25 -0
  67. package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.mjs +2 -0
  68. package/dist/esm/api/resources/transactions/types/CoreTransactionRequest.d.mts +6 -0
  69. package/dist/esm/api/resources/transactions/types/CoreTransactionRequest.mjs +2 -0
  70. package/dist/esm/api/resources/transactions/types/FinancialInstitution.d.mts +6 -0
  71. package/dist/esm/api/resources/transactions/types/FinancialInstitution.mjs +2 -0
  72. package/dist/esm/api/resources/transactions/types/MatchedTransactionsAttributes.d.mts +1 -1
  73. package/dist/esm/api/resources/transactions/types/Transactions.d.mts +4 -1
  74. package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +3 -3
  75. package/dist/esm/api/resources/transactions/types/TransactionsRequestBody.d.mts +27 -0
  76. package/dist/esm/api/resources/transactions/types/index.d.mts +4 -0
  77. package/dist/esm/api/resources/transactions/types/index.mjs +4 -0
  78. package/dist/esm/api/resources/users/resources/attributions/client/Client.d.mts +19 -0
  79. package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +95 -0
  80. package/dist/esm/api/resources/users/resources/attributions/client/index.d.mts +1 -1
  81. package/dist/esm/api/resources/users/resources/attributions/client/index.mjs +1 -1
  82. package/dist/esm/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.d.mts +11 -0
  83. package/dist/esm/api/resources/users/resources/attributions/client/requests/ActivateOfferRequest.mjs +2 -0
  84. package/dist/esm/api/resources/users/resources/attributions/client/requests/index.d.mts +1 -0
  85. package/dist/esm/api/resources/users/resources/attributions/client/requests/index.mjs +1 -0
  86. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.d.mts +5 -0
  87. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncludeOption.mjs +5 -0
  88. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncluded.d.mts +2 -0
  89. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferIncluded.mjs +2 -0
  90. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.mts +20 -0
  91. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.mjs +2 -0
  92. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.d.mts +6 -0
  93. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseAttributes.mjs +2 -0
  94. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseData.d.mts +6 -0
  95. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponseData.mjs +2 -0
  96. package/dist/esm/api/resources/users/resources/attributions/types/EventCode.d.mts +1 -0
  97. package/dist/esm/api/resources/users/resources/attributions/types/EventCode.mjs +1 -0
  98. package/dist/esm/api/resources/users/resources/attributions/types/OfferMedium.d.mts +1 -0
  99. package/dist/esm/api/resources/users/resources/attributions/types/OfferMedium.mjs +1 -0
  100. package/dist/esm/api/resources/users/resources/attributions/types/index.d.mts +5 -0
  101. package/dist/esm/api/resources/users/resources/attributions/types/index.mjs +5 -0
  102. package/dist/esm/api/resources/users/resources/index.d.mts +1 -0
  103. package/dist/esm/api/resources/users/resources/index.mjs +1 -0
  104. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +2 -4
  105. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +20 -6
  106. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetLocationsByUserRequest.d.mts +2 -0
  107. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByUserRequest.d.mts +2 -0
  108. package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.d.mts +6 -0
  109. package/dist/esm/api/resources/users/resources/rewards/types/ButtonStyle.mjs +6 -0
  110. package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.d.mts +9 -0
  111. package/dist/esm/api/resources/users/resources/rewards/types/ComponentType.mjs +9 -0
  112. package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.d.mts +10 -0
  113. package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.mjs +2 -0
  114. package/dist/esm/api/resources/users/resources/rewards/types/OfferCommonFields.d.mts +2 -0
  115. package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.d.mts +16 -0
  116. package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.mjs +2 -0
  117. package/dist/esm/api/resources/users/resources/rewards/types/index.d.mts +4 -0
  118. package/dist/esm/api/resources/users/resources/rewards/types/index.mjs +4 -0
  119. package/dist/esm/version.d.mts +1 -1
  120. package/dist/esm/version.mjs +1 -1
  121. package/package.json +1 -1
  122. 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.<br/>
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) endpoint with the
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. To
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/>