@kard-financial/sdk 12.3.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +106 -15
  2. package/dist/cjs/BaseClient.d.ts +7 -8
  3. package/dist/cjs/BaseClient.js +3 -3
  4. package/dist/cjs/Client.d.ts +13 -2
  5. package/dist/cjs/Client.js +67 -0
  6. package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -2
  7. package/dist/cjs/api/resources/auth/client/Client.js +3 -23
  8. package/dist/cjs/api/resources/auth/exports.d.ts +2 -0
  9. package/dist/cjs/api/resources/auth/exports.js +21 -0
  10. package/dist/cjs/api/resources/commons/errors/ConflictError.js +5 -1
  11. package/dist/cjs/api/resources/commons/errors/DoesNotExistError.js +5 -1
  12. package/dist/cjs/api/resources/commons/errors/ForbiddenError.js +5 -1
  13. package/dist/cjs/api/resources/commons/errors/InternalServerError.js +5 -1
  14. package/dist/cjs/api/resources/commons/errors/InvalidRequest.js +5 -1
  15. package/dist/cjs/api/resources/commons/errors/UnauthorizedError.js +5 -1
  16. package/dist/cjs/api/resources/commons/exports.d.ts +1 -0
  17. package/dist/cjs/api/resources/commons/exports.js +18 -0
  18. package/dist/cjs/api/resources/commons/types/ErrorObject.d.ts +2 -2
  19. package/dist/cjs/api/resources/commons/types/ErrorSource.d.ts +3 -3
  20. package/dist/cjs/api/resources/commons/types/Links.d.ts +2 -2
  21. package/dist/cjs/api/resources/files/client/Client.d.ts +1 -2
  22. package/dist/cjs/api/resources/files/client/Client.js +11 -47
  23. package/dist/cjs/api/resources/files/exports.d.ts +2 -0
  24. package/dist/cjs/api/resources/files/exports.js +21 -0
  25. package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -2
  26. package/dist/cjs/api/resources/notifications/exports.d.ts +3 -0
  27. package/dist/cjs/api/resources/notifications/exports.js +22 -0
  28. package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.d.ts +1 -2
  29. package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.js +7 -64
  30. package/dist/cjs/api/resources/notifications/resources/subscriptions/exports.d.ts +2 -0
  31. package/dist/cjs/api/resources/notifications/resources/subscriptions/exports.js +21 -0
  32. package/dist/cjs/api/resources/notifications/resources/subscriptions/types/UpdateSubscriptionRequestAttributes.d.ts +3 -3
  33. package/dist/cjs/api/resources/notifications/types/AuditUpdateAttributes.d.ts +3 -3
  34. package/dist/cjs/api/resources/notifications/types/FailedTransactionAttributes.d.ts +1 -1
  35. package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +2 -2
  36. package/dist/cjs/api/resources/notifications/types/RewardNotificationAttributes.d.ts +2 -2
  37. package/dist/cjs/api/resources/ping/client/Client.d.ts +1 -2
  38. package/dist/cjs/api/resources/ping/client/Client.js +2 -20
  39. package/dist/cjs/api/resources/ping/errors/NetworkBlockedError.js +5 -1
  40. package/dist/cjs/api/resources/ping/exports.d.ts +2 -0
  41. package/dist/cjs/api/resources/ping/exports.js +21 -0
  42. package/dist/cjs/api/resources/transactions/client/Client.d.ts +3 -3
  43. package/dist/cjs/api/resources/transactions/client/Client.js +16 -115
  44. package/dist/cjs/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.ts +3 -0
  45. package/dist/cjs/api/resources/transactions/errors/CreateAuditMultiStatus.js +5 -1
  46. package/dist/cjs/api/resources/transactions/errors/CreateIncomingTransactionsMultiStatus.js +5 -1
  47. package/dist/cjs/api/resources/transactions/errors/FraudMultiStatus.js +5 -1
  48. package/dist/cjs/api/resources/transactions/exports.d.ts +2 -0
  49. package/dist/cjs/api/resources/transactions/exports.js +21 -0
  50. package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +3 -3
  51. package/dist/cjs/api/resources/transactions/types/CreateAuditMultiStatusResponse.d.ts +1 -1
  52. package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsMeta.d.ts +4 -0
  53. package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsMeta.js +3 -0
  54. package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsResponse.d.ts +50 -2
  55. package/dist/cjs/api/resources/transactions/types/MatchedTransactionsAttributes.d.ts +14 -14
  56. package/dist/cjs/api/resources/transactions/types/Merchant.d.ts +9 -9
  57. package/dist/cjs/api/resources/transactions/types/RewardedTransactionAttributes.d.ts +3 -3
  58. package/dist/cjs/api/resources/transactions/types/RewardedTransactionStatus.d.ts +1 -0
  59. package/dist/cjs/api/resources/transactions/types/RewardedTransactionStatus.js +1 -0
  60. package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +18 -18
  61. package/dist/cjs/api/resources/transactions/types/index.d.ts +1 -0
  62. package/dist/cjs/api/resources/transactions/types/index.js +1 -0
  63. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -2
  64. package/dist/cjs/api/resources/users/client/Client.js +5 -80
  65. package/dist/cjs/api/resources/users/errors/MultiStatus.js +5 -1
  66. package/dist/cjs/api/resources/users/exports.d.ts +3 -0
  67. package/dist/cjs/api/resources/users/exports.js +22 -0
  68. package/dist/cjs/api/resources/users/resources/attributions/client/Client.d.ts +1 -2
  69. package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +20 -94
  70. package/dist/cjs/api/resources/users/resources/attributions/exports.d.ts +2 -0
  71. package/dist/cjs/api/resources/users/resources/attributions/exports.js +21 -0
  72. package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.ts +1 -1
  73. package/dist/cjs/api/resources/users/resources/attributions/types/AttributionState.d.ts +2 -2
  74. package/dist/cjs/api/resources/users/resources/attributions/types/BoostOfferResponse.d.ts +1 -1
  75. package/dist/cjs/api/resources/users/resources/attributions/types/NotificationAttributionAttributes.d.ts +1 -1
  76. package/dist/cjs/api/resources/users/resources/attributions/types/OfferAttributionAttributes.d.ts +1 -1
  77. package/dist/cjs/api/resources/users/resources/auth/client/Client.d.ts +1 -2
  78. package/dist/cjs/api/resources/users/resources/auth/client/Client.js +2 -20
  79. package/dist/cjs/api/resources/users/resources/auth/exports.d.ts +2 -0
  80. package/dist/cjs/api/resources/users/resources/auth/exports.js +21 -0
  81. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +1 -2
  82. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +39 -144
  83. package/dist/cjs/api/resources/users/resources/rewards/exports.d.ts +2 -0
  84. package/dist/cjs/api/resources/users/resources/rewards/exports.js +21 -0
  85. package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.d.ts +2 -2
  86. package/dist/cjs/api/resources/users/resources/rewards/types/LocationData.d.ts +1 -1
  87. package/dist/cjs/api/resources/users/resources/rewards/types/LocationsResponseObject.d.ts +1 -1
  88. package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlare.d.ts +1 -1
  89. package/dist/cjs/api/resources/users/resources/rewards/types/OfferCommonFields.d.ts +8 -8
  90. package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.d.ts +9 -9
  91. package/dist/cjs/api/resources/users/resources/rewards/types/OffersMeta.d.ts +1 -1
  92. package/dist/cjs/api/resources/users/resources/rewards/types/OffersResponseObject.d.ts +2 -2
  93. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBar.d.ts +1 -1
  94. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.ts +2 -2
  95. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabels.d.ts +1 -1
  96. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegment.d.ts +1 -1
  97. package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegments.d.ts +1 -1
  98. package/dist/cjs/api/resources/users/resources/rewards/types/StandardOffer.d.ts +1 -1
  99. package/dist/cjs/api/resources/users/resources/uploads/client/Client.d.ts +1 -2
  100. package/dist/cjs/api/resources/users/resources/uploads/client/Client.js +4 -60
  101. package/dist/cjs/api/resources/users/resources/uploads/errors/UploadPartMultiStatus.js +5 -1
  102. package/dist/cjs/api/resources/users/resources/uploads/exports.d.ts +2 -0
  103. package/dist/cjs/api/resources/users/resources/uploads/exports.js +21 -0
  104. package/dist/cjs/api/resources/users/resources/uploads/types/CreateUploadPartMultiStatusResponse.d.ts +1 -1
  105. package/dist/cjs/api/resources/users/types/CreateUsersMultiStatusResponse.d.ts +1 -1
  106. package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.d.ts +5 -5
  107. package/dist/cjs/api/resources/users/types/UserRequestAttributes.d.ts +6 -6
  108. package/dist/cjs/auth/OAuthAuthProvider.d.ts +36 -14
  109. package/dist/cjs/auth/OAuthAuthProvider.js +108 -40
  110. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  111. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  112. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  113. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  114. package/dist/cjs/core/fetcher/Fetcher.d.ts +3 -2
  115. package/dist/cjs/core/fetcher/Fetcher.js +12 -2
  116. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  117. package/dist/cjs/core/fetcher/index.js +3 -1
  118. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  119. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  120. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  121. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  122. package/dist/cjs/core/headers.d.ts +2 -2
  123. package/dist/cjs/core/runtime/runtime.js +8 -7
  124. package/dist/cjs/errors/KardApiError.d.ts +3 -1
  125. package/dist/cjs/errors/KardApiError.js +9 -2
  126. package/dist/cjs/errors/KardApiTimeoutError.d.ts +4 -1
  127. package/dist/cjs/errors/KardApiTimeoutError.js +9 -2
  128. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  129. package/dist/cjs/errors/handleNonStatusCodeError.js +68 -0
  130. package/dist/cjs/version.d.ts +1 -1
  131. package/dist/cjs/version.js +1 -1
  132. package/dist/esm/BaseClient.d.mts +7 -8
  133. package/dist/esm/BaseClient.mjs +3 -3
  134. package/dist/esm/Client.d.mts +13 -2
  135. package/dist/esm/Client.mjs +34 -0
  136. package/dist/esm/api/resources/auth/client/Client.d.mts +1 -2
  137. package/dist/esm/api/resources/auth/client/Client.mjs +3 -23
  138. package/dist/esm/api/resources/auth/exports.d.mts +2 -0
  139. package/dist/esm/api/resources/auth/exports.mjs +3 -0
  140. package/dist/esm/api/resources/commons/errors/ConflictError.mjs +5 -1
  141. package/dist/esm/api/resources/commons/errors/DoesNotExistError.mjs +5 -1
  142. package/dist/esm/api/resources/commons/errors/ForbiddenError.mjs +5 -1
  143. package/dist/esm/api/resources/commons/errors/InternalServerError.mjs +5 -1
  144. package/dist/esm/api/resources/commons/errors/InvalidRequest.mjs +5 -1
  145. package/dist/esm/api/resources/commons/errors/UnauthorizedError.mjs +5 -1
  146. package/dist/esm/api/resources/commons/exports.d.mts +1 -0
  147. package/dist/esm/api/resources/commons/exports.mjs +2 -0
  148. package/dist/esm/api/resources/commons/types/ErrorObject.d.mts +2 -2
  149. package/dist/esm/api/resources/commons/types/ErrorSource.d.mts +3 -3
  150. package/dist/esm/api/resources/commons/types/Links.d.mts +2 -2
  151. package/dist/esm/api/resources/files/client/Client.d.mts +1 -2
  152. package/dist/esm/api/resources/files/client/Client.mjs +11 -47
  153. package/dist/esm/api/resources/files/exports.d.mts +2 -0
  154. package/dist/esm/api/resources/files/exports.mjs +3 -0
  155. package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -2
  156. package/dist/esm/api/resources/notifications/exports.d.mts +3 -0
  157. package/dist/esm/api/resources/notifications/exports.mjs +4 -0
  158. package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.d.mts +1 -2
  159. package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.mjs +7 -64
  160. package/dist/esm/api/resources/notifications/resources/subscriptions/exports.d.mts +2 -0
  161. package/dist/esm/api/resources/notifications/resources/subscriptions/exports.mjs +3 -0
  162. package/dist/esm/api/resources/notifications/resources/subscriptions/types/UpdateSubscriptionRequestAttributes.d.mts +3 -3
  163. package/dist/esm/api/resources/notifications/types/AuditUpdateAttributes.d.mts +3 -3
  164. package/dist/esm/api/resources/notifications/types/FailedTransactionAttributes.d.mts +1 -1
  165. package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +2 -2
  166. package/dist/esm/api/resources/notifications/types/RewardNotificationAttributes.d.mts +2 -2
  167. package/dist/esm/api/resources/ping/client/Client.d.mts +1 -2
  168. package/dist/esm/api/resources/ping/client/Client.mjs +2 -20
  169. package/dist/esm/api/resources/ping/errors/NetworkBlockedError.mjs +5 -1
  170. package/dist/esm/api/resources/ping/exports.d.mts +2 -0
  171. package/dist/esm/api/resources/ping/exports.mjs +3 -0
  172. package/dist/esm/api/resources/transactions/client/Client.d.mts +3 -3
  173. package/dist/esm/api/resources/transactions/client/Client.mjs +16 -115
  174. package/dist/esm/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.mts +3 -0
  175. package/dist/esm/api/resources/transactions/errors/CreateAuditMultiStatus.mjs +5 -1
  176. package/dist/esm/api/resources/transactions/errors/CreateIncomingTransactionsMultiStatus.mjs +5 -1
  177. package/dist/esm/api/resources/transactions/errors/FraudMultiStatus.mjs +5 -1
  178. package/dist/esm/api/resources/transactions/exports.d.mts +2 -0
  179. package/dist/esm/api/resources/transactions/exports.mjs +3 -0
  180. package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +3 -3
  181. package/dist/esm/api/resources/transactions/types/CreateAuditMultiStatusResponse.d.mts +1 -1
  182. package/dist/esm/api/resources/transactions/types/GetEarnedRewardsMeta.d.mts +4 -0
  183. package/dist/esm/api/resources/transactions/types/GetEarnedRewardsMeta.mjs +2 -0
  184. package/dist/esm/api/resources/transactions/types/GetEarnedRewardsResponse.d.mts +50 -2
  185. package/dist/esm/api/resources/transactions/types/MatchedTransactionsAttributes.d.mts +14 -14
  186. package/dist/esm/api/resources/transactions/types/Merchant.d.mts +9 -9
  187. package/dist/esm/api/resources/transactions/types/RewardedTransactionAttributes.d.mts +3 -3
  188. package/dist/esm/api/resources/transactions/types/RewardedTransactionStatus.d.mts +1 -0
  189. package/dist/esm/api/resources/transactions/types/RewardedTransactionStatus.mjs +1 -0
  190. package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +18 -18
  191. package/dist/esm/api/resources/transactions/types/index.d.mts +1 -0
  192. package/dist/esm/api/resources/transactions/types/index.mjs +1 -0
  193. package/dist/esm/api/resources/users/client/Client.d.mts +1 -2
  194. package/dist/esm/api/resources/users/client/Client.mjs +5 -80
  195. package/dist/esm/api/resources/users/errors/MultiStatus.mjs +5 -1
  196. package/dist/esm/api/resources/users/exports.d.mts +3 -0
  197. package/dist/esm/api/resources/users/exports.mjs +4 -0
  198. package/dist/esm/api/resources/users/resources/attributions/client/Client.d.mts +1 -2
  199. package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +20 -94
  200. package/dist/esm/api/resources/users/resources/attributions/exports.d.mts +2 -0
  201. package/dist/esm/api/resources/users/resources/attributions/exports.mjs +3 -0
  202. package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.mts +1 -1
  203. package/dist/esm/api/resources/users/resources/attributions/types/AttributionState.d.mts +2 -2
  204. package/dist/esm/api/resources/users/resources/attributions/types/BoostOfferResponse.d.mts +1 -1
  205. package/dist/esm/api/resources/users/resources/attributions/types/NotificationAttributionAttributes.d.mts +1 -1
  206. package/dist/esm/api/resources/users/resources/attributions/types/OfferAttributionAttributes.d.mts +1 -1
  207. package/dist/esm/api/resources/users/resources/auth/client/Client.d.mts +1 -2
  208. package/dist/esm/api/resources/users/resources/auth/client/Client.mjs +2 -20
  209. package/dist/esm/api/resources/users/resources/auth/exports.d.mts +2 -0
  210. package/dist/esm/api/resources/users/resources/auth/exports.mjs +3 -0
  211. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +1 -2
  212. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +39 -144
  213. package/dist/esm/api/resources/users/resources/rewards/exports.d.mts +2 -0
  214. package/dist/esm/api/resources/users/resources/rewards/exports.mjs +3 -0
  215. package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.d.mts +2 -2
  216. package/dist/esm/api/resources/users/resources/rewards/types/LocationData.d.mts +1 -1
  217. package/dist/esm/api/resources/users/resources/rewards/types/LocationsResponseObject.d.mts +1 -1
  218. package/dist/esm/api/resources/users/resources/rewards/types/LogoFlare.d.mts +1 -1
  219. package/dist/esm/api/resources/users/resources/rewards/types/OfferCommonFields.d.mts +8 -8
  220. package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.d.mts +9 -9
  221. package/dist/esm/api/resources/users/resources/rewards/types/OffersMeta.d.mts +1 -1
  222. package/dist/esm/api/resources/users/resources/rewards/types/OffersResponseObject.d.mts +2 -2
  223. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBar.d.mts +1 -1
  224. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.mts +2 -2
  225. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabels.d.mts +1 -1
  226. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegment.d.mts +1 -1
  227. package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegments.d.mts +1 -1
  228. package/dist/esm/api/resources/users/resources/rewards/types/StandardOffer.d.mts +1 -1
  229. package/dist/esm/api/resources/users/resources/uploads/client/Client.d.mts +1 -2
  230. package/dist/esm/api/resources/users/resources/uploads/client/Client.mjs +4 -60
  231. package/dist/esm/api/resources/users/resources/uploads/errors/UploadPartMultiStatus.mjs +5 -1
  232. package/dist/esm/api/resources/users/resources/uploads/exports.d.mts +2 -0
  233. package/dist/esm/api/resources/users/resources/uploads/exports.mjs +3 -0
  234. package/dist/esm/api/resources/users/resources/uploads/types/CreateUploadPartMultiStatusResponse.d.mts +1 -1
  235. package/dist/esm/api/resources/users/types/CreateUsersMultiStatusResponse.d.mts +1 -1
  236. package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.d.mts +5 -5
  237. package/dist/esm/api/resources/users/types/UserRequestAttributes.d.mts +6 -6
  238. package/dist/esm/auth/OAuthAuthProvider.d.mts +36 -14
  239. package/dist/esm/auth/OAuthAuthProvider.mjs +106 -39
  240. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  241. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  242. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  243. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  244. package/dist/esm/core/fetcher/Fetcher.d.mts +3 -2
  245. package/dist/esm/core/fetcher/Fetcher.mjs +12 -2
  246. package/dist/esm/core/fetcher/index.d.mts +2 -0
  247. package/dist/esm/core/fetcher/index.mjs +1 -0
  248. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  249. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  250. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  251. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  252. package/dist/esm/core/headers.d.mts +2 -2
  253. package/dist/esm/core/runtime/runtime.mjs +8 -7
  254. package/dist/esm/errors/KardApiError.d.mts +3 -1
  255. package/dist/esm/errors/KardApiError.mjs +9 -2
  256. package/dist/esm/errors/KardApiTimeoutError.d.mts +4 -1
  257. package/dist/esm/errors/KardApiTimeoutError.mjs +9 -2
  258. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  259. package/dist/esm/errors/handleNonStatusCodeError.mjs +32 -0
  260. package/dist/esm/version.d.mts +1 -1
  261. package/dist/esm/version.mjs +1 -1
  262. package/package.json +134 -10
  263. package/reference.md +3 -1
@@ -48,6 +48,7 @@ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
48
  const headers_js_1 = require("../../../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
51
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
52
53
  const KardApi = __importStar(require("../../../../../index.js"));
53
54
  class AttributionsClient {
@@ -141,26 +142,7 @@ class AttributionsClient {
141
142
  });
142
143
  }
143
144
  }
144
- switch (_response.error.reason) {
145
- case "non-json":
146
- throw new errors.KardApiError({
147
- statusCode: _response.error.statusCode,
148
- body: _response.error.rawBody,
149
- rawResponse: _response.rawResponse,
150
- });
151
- case "body-is-null":
152
- throw new errors.KardApiError({
153
- statusCode: _response.error.statusCode,
154
- rawResponse: _response.rawResponse,
155
- });
156
- case "timeout":
157
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/attributions.");
158
- case "unknown":
159
- throw new errors.KardApiError({
160
- message: _response.error.errorMessage,
161
- rawResponse: _response.rawResponse,
162
- });
163
- }
145
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/attributions");
164
146
  });
165
147
  }
166
148
  /**
@@ -187,23 +169,14 @@ class AttributionsClient {
187
169
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
188
170
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
189
171
  const { supportedComponents, include } = request;
190
- const _queryParams = {};
191
- if (supportedComponents != null) {
192
- if (Array.isArray(supportedComponents)) {
193
- _queryParams.supportedComponents = supportedComponents.map((item) => item);
194
- }
195
- else {
196
- _queryParams.supportedComponents = supportedComponents;
197
- }
198
- }
199
- if (include != null) {
200
- if (Array.isArray(include)) {
201
- _queryParams.include = include.map((item) => item);
202
- }
203
- else {
204
- _queryParams.include = include;
205
- }
206
- }
172
+ const _queryParams = {
173
+ supportedComponents: Array.isArray(supportedComponents)
174
+ ? supportedComponents.map((item) => item)
175
+ : supportedComponents != null
176
+ ? supportedComponents
177
+ : undefined,
178
+ include: Array.isArray(include) ? include.map((item) => item) : include != null ? include : undefined,
179
+ };
207
180
  const _authRequest = yield this._options.authProvider.getAuthRequest();
208
181
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
209
182
  const _response = yield core.fetcher({
@@ -236,26 +209,7 @@ class AttributionsClient {
236
209
  });
237
210
  }
238
211
  }
239
- switch (_response.error.reason) {
240
- case "non-json":
241
- throw new errors.KardApiError({
242
- statusCode: _response.error.statusCode,
243
- body: _response.error.rawBody,
244
- rawResponse: _response.rawResponse,
245
- });
246
- case "body-is-null":
247
- throw new errors.KardApiError({
248
- statusCode: _response.error.statusCode,
249
- rawResponse: _response.rawResponse,
250
- });
251
- case "timeout":
252
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate.");
253
- case "unknown":
254
- throw new errors.KardApiError({
255
- message: _response.error.errorMessage,
256
- rawResponse: _response.rawResponse,
257
- });
258
- }
212
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate");
259
213
  });
260
214
  }
261
215
  /**
@@ -282,23 +236,14 @@ class AttributionsClient {
282
236
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
283
237
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
284
238
  const { supportedComponents, include } = request;
285
- const _queryParams = {};
286
- if (supportedComponents != null) {
287
- if (Array.isArray(supportedComponents)) {
288
- _queryParams.supportedComponents = supportedComponents.map((item) => item);
289
- }
290
- else {
291
- _queryParams.supportedComponents = supportedComponents;
292
- }
293
- }
294
- if (include != null) {
295
- if (Array.isArray(include)) {
296
- _queryParams.include = include.map((item) => item);
297
- }
298
- else {
299
- _queryParams.include = include;
300
- }
301
- }
239
+ const _queryParams = {
240
+ supportedComponents: Array.isArray(supportedComponents)
241
+ ? supportedComponents.map((item) => item)
242
+ : supportedComponents != null
243
+ ? supportedComponents
244
+ : undefined,
245
+ include: Array.isArray(include) ? include.map((item) => item) : include != null ? include : undefined,
246
+ };
302
247
  const _authRequest = yield this._options.authProvider.getAuthRequest();
303
248
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
304
249
  const _response = yield core.fetcher({
@@ -331,26 +276,7 @@ class AttributionsClient {
331
276
  });
332
277
  }
333
278
  }
334
- switch (_response.error.reason) {
335
- case "non-json":
336
- throw new errors.KardApiError({
337
- statusCode: _response.error.statusCode,
338
- body: _response.error.rawBody,
339
- rawResponse: _response.rawResponse,
340
- });
341
- case "body-is-null":
342
- throw new errors.KardApiError({
343
- statusCode: _response.error.statusCode,
344
- rawResponse: _response.rawResponse,
345
- });
346
- case "timeout":
347
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/boost.");
348
- case "unknown":
349
- throw new errors.KardApiError({
350
- message: _response.error.errorMessage,
351
- rawResponse: _response.rawResponse,
352
- });
353
- }
279
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/boost");
354
280
  });
355
281
  }
356
282
  }
@@ -0,0 +1,2 @@
1
+ export { AttributionsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AttributionsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AttributionsClient", { enumerable: true, get: function () { return Client_js_1.AttributionsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -16,5 +16,5 @@ import type * as KardApi from "../../../../../index.js";
16
16
  */
17
17
  export interface ActivateOfferResponse {
18
18
  data: KardApi.users.ActivateOfferResponseData;
19
- included?: KardApi.users.ActivateOfferIncluded[];
19
+ included?: KardApi.users.ActivateOfferIncluded[] | undefined;
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import type * as KardApi from "../../../../../index.js";
2
2
  export interface AttributionState {
3
3
  /** The position of the offer in the list shown to the user (1-indexed) */
4
- rank?: number;
4
+ rank?: number | undefined;
5
5
  /** The active filters when the user saw the offer */
6
- filters?: KardApi.users.AttributionFilter[];
6
+ filters?: KardApi.users.AttributionFilter[] | undefined;
7
7
  }
@@ -16,5 +16,5 @@ import type * as KardApi from "../../../../../index.js";
16
16
  */
17
17
  export interface BoostOfferResponse {
18
18
  data: KardApi.users.BoostOfferResponseData;
19
- included?: KardApi.users.BoostOfferIncluded[];
19
+ included?: KardApi.users.BoostOfferIncluded[] | undefined;
20
20
  }
@@ -10,5 +10,5 @@ export interface NotificationAttributionAttributes {
10
10
  */
11
11
  eventDate: string;
12
12
  /** Placement context for the attribution event */
13
- state?: KardApi.users.AttributionState;
13
+ state?: KardApi.users.AttributionState | undefined;
14
14
  }
@@ -10,5 +10,5 @@ export interface OfferAttributionAttributes {
10
10
  */
11
11
  eventDate: string;
12
12
  /** Placement context for the attribution event */
13
- state?: KardApi.users.AttributionState;
13
+ state?: KardApi.users.AttributionState | undefined;
14
14
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as KardApi from "../../../../../index.js";
5
5
  export declare namespace AuthClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -48,6 +48,7 @@ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
48
  const headers_js_1 = require("../../../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
51
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
52
53
  const KardApi = __importStar(require("../../../../../index.js"));
53
54
  class AuthClient {
@@ -103,26 +104,7 @@ class AuthClient {
103
104
  });
104
105
  }
105
106
  }
106
- switch (_response.error.reason) {
107
- case "non-json":
108
- throw new errors.KardApiError({
109
- statusCode: _response.error.statusCode,
110
- body: _response.error.rawBody,
111
- rawResponse: _response.rawResponse,
112
- });
113
- case "body-is-null":
114
- throw new errors.KardApiError({
115
- statusCode: _response.error.statusCode,
116
- rawResponse: _response.rawResponse,
117
- });
118
- case "timeout":
119
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/auth/issuers/{organizationId}/users/{userId}/token.");
120
- case "unknown":
121
- throw new errors.KardApiError({
122
- message: _response.error.errorMessage,
123
- rawResponse: _response.rawResponse,
124
- });
125
- }
107
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/auth/issuers/{organizationId}/users/{userId}/token");
126
108
  });
127
109
  }
128
110
  }
@@ -0,0 +1,2 @@
1
+ export { AuthClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AuthClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return Client_js_1.AuthClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as KardApi from "../../../../../index.js";
5
5
  export declare namespace RewardsClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -49,6 +49,7 @@ const headers_js_1 = require("../../../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const json_js_1 = require("../../../../../../core/json.js");
51
51
  const environments = __importStar(require("../../../../../../environments.js"));
52
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
54
  const KardApi = __importStar(require("../../../../../index.js"));
54
55
  class RewardsClient {
@@ -85,52 +86,22 @@ class RewardsClient {
85
86
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
86
87
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
88
  const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
88
- const _queryParams = {};
89
- if (pageSize != null) {
90
- _queryParams["page[size]"] = pageSize.toString();
91
- }
92
- if (pageAfter != null) {
93
- _queryParams["page[after]"] = pageAfter;
94
- }
95
- if (pageBefore != null) {
96
- _queryParams["page[before]"] = pageBefore;
97
- }
98
- if (filterSearch != null) {
99
- _queryParams["filter[search]"] = filterSearch;
100
- }
101
- if (filterPurchaseChannel != null) {
102
- _queryParams["filter[purchaseChannel]"] = (0, json_js_1.toJson)(filterPurchaseChannel);
103
- }
104
- if (filterCategory != null) {
105
- _queryParams["filter[category]"] = filterCategory;
106
- }
107
- if (filterIsTargeted != null) {
108
- _queryParams["filter[isTargeted]"] = filterIsTargeted.toString();
109
- }
110
- if (sort != null) {
111
- if (Array.isArray(sort)) {
112
- _queryParams.sort = sort.map((item) => item);
113
- }
114
- else {
115
- _queryParams.sort = sort;
116
- }
117
- }
118
- if (include != null) {
119
- if (Array.isArray(include)) {
120
- _queryParams.include = include.map((item) => item);
121
- }
122
- else {
123
- _queryParams.include = include;
124
- }
125
- }
126
- if (supportedComponents != null) {
127
- if (Array.isArray(supportedComponents)) {
128
- _queryParams.supportedComponents = supportedComponents.map((item) => item);
129
- }
130
- else {
131
- _queryParams.supportedComponents = supportedComponents;
132
- }
133
- }
89
+ const _queryParams = {
90
+ "page[size]": pageSize,
91
+ "page[after]": pageAfter,
92
+ "page[before]": pageBefore,
93
+ "filter[search]": filterSearch,
94
+ "filter[purchaseChannel]": filterPurchaseChannel != null ? (0, json_js_1.toJson)(filterPurchaseChannel) : undefined,
95
+ "filter[category]": filterCategory != null ? filterCategory : undefined,
96
+ "filter[isTargeted]": filterIsTargeted,
97
+ sort: Array.isArray(sort) ? sort.map((item) => item) : sort != null ? sort : undefined,
98
+ include,
99
+ supportedComponents: Array.isArray(supportedComponents)
100
+ ? supportedComponents.map((item) => item)
101
+ : supportedComponents != null
102
+ ? supportedComponents
103
+ : undefined,
104
+ };
134
105
  const _authRequest = yield this._options.authProvider.getAuthRequest();
135
106
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
136
107
  const _response = yield core.fetcher({
@@ -165,26 +136,7 @@ class RewardsClient {
165
136
  });
166
137
  }
167
138
  }
168
- switch (_response.error.reason) {
169
- case "non-json":
170
- throw new errors.KardApiError({
171
- statusCode: _response.error.statusCode,
172
- body: _response.error.rawBody,
173
- rawResponse: _response.rawResponse,
174
- });
175
- case "body-is-null":
176
- throw new errors.KardApiError({
177
- statusCode: _response.error.statusCode,
178
- rawResponse: _response.rawResponse,
179
- });
180
- case "timeout":
181
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/users/{userId}/offers.");
182
- case "unknown":
183
- throw new errors.KardApiError({
184
- message: _response.error.errorMessage,
185
- rawResponse: _response.rawResponse,
186
- });
187
- }
139
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/offers");
188
140
  });
189
141
  }
190
142
  /**
@@ -221,64 +173,26 @@ class RewardsClient {
221
173
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
222
174
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
223
175
  const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[name]": filterName, "filter[city]": filterCity, "filter[zipCode]": filterZipCode, "filter[state]": filterState, "filter[category]": filterCategory, "filter[longitude]": filterLongitude, "filter[latitude]": filterLatitude, "filter[radius]": filterRadius, sort, include, supportedComponents, } = request;
224
- const _queryParams = {};
225
- if (pageSize != null) {
226
- _queryParams["page[size]"] = pageSize.toString();
227
- }
228
- if (pageAfter != null) {
229
- _queryParams["page[after]"] = pageAfter;
230
- }
231
- if (pageBefore != null) {
232
- _queryParams["page[before]"] = pageBefore;
233
- }
234
- if (filterName != null) {
235
- _queryParams["filter[name]"] = filterName;
236
- }
237
- if (filterCity != null) {
238
- _queryParams["filter[city]"] = filterCity;
239
- }
240
- if (filterZipCode != null) {
241
- _queryParams["filter[zipCode]"] = filterZipCode;
242
- }
243
- if (filterState != null) {
244
- _queryParams["filter[state]"] = filterState;
245
- }
246
- if (filterCategory != null) {
247
- _queryParams["filter[category]"] = filterCategory;
248
- }
249
- if (filterLongitude != null) {
250
- _queryParams["filter[longitude]"] = filterLongitude.toString();
251
- }
252
- if (filterLatitude != null) {
253
- _queryParams["filter[latitude]"] = filterLatitude.toString();
254
- }
255
- if (filterRadius != null) {
256
- _queryParams["filter[radius]"] = filterRadius.toString();
257
- }
258
- if (sort != null) {
259
- if (Array.isArray(sort)) {
260
- _queryParams.sort = sort.map((item) => item);
261
- }
262
- else {
263
- _queryParams.sort = sort;
264
- }
265
- }
266
- if (include != null) {
267
- if (Array.isArray(include)) {
268
- _queryParams.include = include.map((item) => item);
269
- }
270
- else {
271
- _queryParams.include = include;
272
- }
273
- }
274
- if (supportedComponents != null) {
275
- if (Array.isArray(supportedComponents)) {
276
- _queryParams.supportedComponents = supportedComponents.map((item) => item);
277
- }
278
- else {
279
- _queryParams.supportedComponents = supportedComponents;
280
- }
281
- }
176
+ const _queryParams = {
177
+ "page[size]": pageSize,
178
+ "page[after]": pageAfter,
179
+ "page[before]": pageBefore,
180
+ "filter[name]": filterName,
181
+ "filter[city]": filterCity,
182
+ "filter[zipCode]": filterZipCode,
183
+ "filter[state]": filterState != null ? filterState : undefined,
184
+ "filter[category]": filterCategory != null ? filterCategory : undefined,
185
+ "filter[longitude]": filterLongitude,
186
+ "filter[latitude]": filterLatitude,
187
+ "filter[radius]": filterRadius,
188
+ sort: Array.isArray(sort) ? sort.map((item) => item) : sort != null ? sort : undefined,
189
+ include,
190
+ supportedComponents: Array.isArray(supportedComponents)
191
+ ? supportedComponents.map((item) => item)
192
+ : supportedComponents != null
193
+ ? supportedComponents
194
+ : undefined,
195
+ };
282
196
  const _authRequest = yield this._options.authProvider.getAuthRequest();
283
197
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
284
198
  const _response = yield core.fetcher({
@@ -316,26 +230,7 @@ class RewardsClient {
316
230
  });
317
231
  }
318
232
  }
319
- switch (_response.error.reason) {
320
- case "non-json":
321
- throw new errors.KardApiError({
322
- statusCode: _response.error.statusCode,
323
- body: _response.error.rawBody,
324
- rawResponse: _response.rawResponse,
325
- });
326
- case "body-is-null":
327
- throw new errors.KardApiError({
328
- statusCode: _response.error.statusCode,
329
- rawResponse: _response.rawResponse,
330
- });
331
- case "timeout":
332
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/users/{userId}/locations.");
333
- case "unknown":
334
- throw new errors.KardApiError({
335
- message: _response.error.errorMessage,
336
- rawResponse: _response.rawResponse,
337
- });
338
- }
233
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/locations");
339
234
  });
340
235
  }
341
236
  }
@@ -0,0 +1,2 @@
1
+ export { RewardsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RewardsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "RewardsClient", { enumerable: true, get: function () { return Client_js_1.RewardsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -8,7 +8,7 @@ export interface CtaComponent {
8
8
  /** Style of the button */
9
9
  buttonStyle: KardApi.users.ButtonStyle;
10
10
  /** Action to perform when the button is clicked */
11
- action?: KardApi.users.CtaAction;
11
+ action?: KardApi.users.CtaAction | undefined;
12
12
  /** Icon identifier to display on the button */
13
- startIcon?: string;
13
+ startIcon?: string | undefined;
14
14
  }
@@ -5,5 +5,5 @@ export interface LocationData {
5
5
  id: KardApi.MongoId;
6
6
  attributes: KardApi.users.LocationAttributes;
7
7
  /** Related resources to the offer */
8
- relationships?: KardApi.users.LocationRelationships;
8
+ relationships?: KardApi.users.LocationRelationships | undefined;
9
9
  }
@@ -142,5 +142,5 @@ import type * as KardApi from "../../../../../index.js";
142
142
  export interface LocationsResponseObject {
143
143
  data: KardApi.users.LocationData[];
144
144
  links: KardApi.Links;
145
- included?: KardApi.users.EligibilityLocationIncluded[];
145
+ included?: KardApi.users.EligibilityLocationIncluded[] | undefined;
146
146
  }
@@ -6,5 +6,5 @@ export interface LogoFlare {
6
6
  /** Border color style for the logo flare */
7
7
  borderColor: KardApi.users.LogoFlareBorderColor;
8
8
  /** Optional badge to display on the logo */
9
- badge?: KardApi.users.LogoFlareBadge;
9
+ badge?: KardApi.users.LogoFlareBadge | undefined;
10
10
  }
@@ -3,7 +3,7 @@ export interface OfferCommonFields {
3
3
  /** Terms and conditions on offer */
4
4
  terms: string;
5
5
  /** Maximum times cardholder can redeem offer, if applicable */
6
- maxRedemptions?: number;
6
+ maxRedemptions?: number | undefined;
7
7
  /** Name of offer */
8
8
  name: string;
9
9
  purchaseChannel: KardApi.PurchaseChannel[];
@@ -17,17 +17,17 @@ export interface OfferCommonFields {
17
17
  /** True returns only targeted offers, false returns only non-targeted offers */
18
18
  isTargeted: boolean;
19
19
  /** Minimum Transaction Amount required to redeem offer, if available on offer */
20
- minTransactionAmount?: KardApi.users.Amount;
20
+ minTransactionAmount?: KardApi.users.Amount | undefined;
21
21
  /** Maximum Transaction Amount allowed to redeem offer, if available on offer */
22
- maxTransactionAmount?: KardApi.users.Amount;
22
+ maxTransactionAmount?: KardApi.users.Amount | undefined;
23
23
  /** Minimum Reward Amount, if available on offer */
24
- minRewardAmount?: KardApi.users.Amount;
24
+ minRewardAmount?: KardApi.users.Amount | undefined;
25
25
  /** Maximum Reward Amount, if available on offer */
26
- maxRewardAmount?: KardApi.users.Amount;
26
+ maxRewardAmount?: KardApi.users.Amount | undefined;
27
27
  /** URL to the website of the offer provider */
28
- websiteUrl?: string;
28
+ websiteUrl?: string | undefined;
29
29
  /** Description of the offer */
30
- description?: string;
30
+ description?: string | undefined;
31
31
  /** UI component data for the offer, returned when supportedComponents query parameter is provided */
32
- components?: KardApi.users.OfferComponents;
32
+ components?: KardApi.users.OfferComponents | undefined;
33
33
  }