@kard-financial/sdk 14.0.0 → 14.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 (262) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +11 -6
  4. package/dist/cjs/api/resources/index.d.ts +4 -0
  5. package/dist/cjs/api/resources/index.js +5 -1
  6. package/dist/cjs/api/resources/internalOrganizations/exports.d.ts +1 -0
  7. package/dist/cjs/api/resources/internalOrganizations/exports.js +18 -0
  8. package/dist/cjs/api/resources/internalOrganizations/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/internalOrganizations/index.js +17 -0
  10. package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceData.d.ts +11 -0
  11. package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceData.js +3 -0
  12. package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceResponse.d.ts +7 -0
  13. package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceResponse.js +3 -0
  14. package/dist/cjs/api/resources/internalOrganizations/types/EnrolledReward.d.ts +6 -0
  15. package/dist/cjs/api/resources/internalOrganizations/types/EnrolledReward.js +9 -0
  16. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.d.ts +10 -0
  17. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.js +3 -0
  18. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.d.ts +11 -0
  19. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.js +14 -0
  20. package/dist/cjs/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.d.ts +9 -0
  21. package/dist/cjs/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.js +3 -0
  22. package/dist/cjs/api/resources/internalOrganizations/types/index.d.ts +6 -0
  23. package/dist/cjs/api/resources/internalOrganizations/types/index.js +22 -0
  24. package/dist/cjs/api/resources/organizations/client/Client.d.ts +35 -0
  25. package/dist/cjs/api/resources/organizations/client/Client.js +126 -0
  26. package/dist/cjs/api/resources/organizations/client/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/organizations/client/index.js +2 -0
  28. package/dist/cjs/api/resources/organizations/exports.d.ts +3 -0
  29. package/dist/cjs/api/resources/organizations/exports.js +22 -0
  30. package/dist/cjs/api/resources/organizations/index.d.ts +3 -0
  31. package/dist/cjs/api/resources/organizations/index.js +19 -0
  32. package/dist/cjs/api/resources/organizations/resources/children/client/Client.d.ts +113 -0
  33. package/dist/cjs/api/resources/organizations/resources/children/client/Client.js +382 -0
  34. package/dist/cjs/api/resources/organizations/resources/children/client/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/organizations/resources/children/client/index.js +17 -0
  36. package/dist/cjs/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.d.ts +10 -0
  37. package/dist/cjs/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.js +3 -0
  38. package/dist/cjs/api/resources/organizations/resources/children/client/requests/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/organizations/resources/children/client/requests/index.js +2 -0
  40. package/dist/cjs/api/resources/organizations/resources/children/exports.d.ts +2 -0
  41. package/dist/cjs/api/resources/organizations/resources/children/exports.js +21 -0
  42. package/dist/cjs/api/resources/organizations/resources/children/index.d.ts +2 -0
  43. package/dist/cjs/api/resources/organizations/resources/children/index.js +18 -0
  44. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.ts +11 -0
  45. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.js +3 -0
  46. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildAttributes.d.ts +18 -0
  47. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildAttributes.js +3 -0
  48. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestBody.d.ts +8 -0
  49. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestBody.js +3 -0
  50. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestData.d.ts +10 -0
  51. package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestData.js +3 -0
  52. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.ts +21 -0
  53. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildAttributes.js +3 -0
  54. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestBody.d.ts +8 -0
  55. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestBody.js +3 -0
  56. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestData.d.ts +10 -0
  57. package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestData.js +3 -0
  58. package/dist/cjs/api/resources/organizations/resources/children/types/index.d.ts +7 -0
  59. package/dist/cjs/api/resources/organizations/resources/children/types/index.js +23 -0
  60. package/dist/cjs/api/resources/organizations/resources/index.d.ts +6 -0
  61. package/dist/cjs/api/resources/organizations/resources/index.js +45 -0
  62. package/dist/cjs/api/resources/organizations/resources/placements/client/Client.d.ts +131 -0
  63. package/dist/cjs/api/resources/organizations/resources/placements/client/Client.js +409 -0
  64. package/dist/cjs/api/resources/organizations/resources/placements/client/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/organizations/resources/placements/client/index.js +17 -0
  66. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.ts +10 -0
  67. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.js +3 -0
  68. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/index.d.ts +1 -0
  69. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/index.js +2 -0
  70. package/dist/cjs/api/resources/organizations/resources/placements/exports.d.ts +2 -0
  71. package/dist/cjs/api/resources/organizations/resources/placements/exports.js +21 -0
  72. package/dist/cjs/api/resources/organizations/resources/placements/index.d.ts +2 -0
  73. package/dist/cjs/api/resources/organizations/resources/placements/index.js +18 -0
  74. package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.d.ts +14 -0
  75. package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.js +3 -0
  76. package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.d.ts +7 -0
  77. package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.js +10 -0
  78. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.ts +15 -0
  79. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.js +3 -0
  80. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.ts +8 -0
  81. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.js +3 -0
  82. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.ts +13 -0
  83. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.js +3 -0
  84. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.ts +33 -0
  85. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.js +3 -0
  86. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.d.ts +19 -0
  87. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.js +3 -0
  88. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.d.ts +8 -0
  89. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.js +3 -0
  90. package/dist/cjs/api/resources/organizations/resources/placements/types/DayOfWeek.d.ts +11 -0
  91. package/dist/cjs/api/resources/organizations/resources/placements/types/DayOfWeek.js +14 -0
  92. package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.ts +15 -0
  93. package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.js +3 -0
  94. package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementData.d.ts +9 -0
  95. package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementData.js +3 -0
  96. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.ts +42 -0
  97. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.js +3 -0
  98. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.d.ts +11 -0
  99. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.js +3 -0
  100. package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.d.ts +16 -0
  101. package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.js +3 -0
  102. package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.d.ts +9 -0
  103. package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.js +3 -0
  104. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.d.ts +15 -0
  105. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.js +3 -0
  106. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.ts +8 -0
  107. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.js +3 -0
  108. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.ts +13 -0
  109. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.js +3 -0
  110. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.d.ts +8 -0
  111. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.js +3 -0
  112. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.d.ts +20 -0
  113. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.js +3 -0
  114. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.d.ts +8 -0
  115. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.js +3 -0
  116. package/dist/cjs/api/resources/organizations/resources/placements/types/index.d.ts +21 -0
  117. package/dist/cjs/api/resources/organizations/resources/placements/types/index.js +37 -0
  118. package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.d.ts +30 -0
  119. package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.js +3 -0
  120. package/dist/cjs/api/resources/organizations/types/ExternalOrganizationResponse.d.ts +10 -0
  121. package/dist/cjs/api/resources/organizations/types/ExternalOrganizationResponse.js +3 -0
  122. package/dist/cjs/api/resources/organizations/types/index.d.ts +2 -0
  123. package/dist/cjs/api/resources/organizations/types/index.js +18 -0
  124. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +21 -0
  125. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +75 -0
  126. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.ts +16 -0
  127. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.js +3 -0
  128. package/dist/cjs/api/resources/users/resources/rewards/client/requests/index.d.ts +1 -0
  129. package/dist/cjs/version.d.ts +1 -1
  130. package/dist/cjs/version.js +1 -1
  131. package/dist/esm/BaseClient.mjs +2 -2
  132. package/dist/esm/Client.d.mts +3 -0
  133. package/dist/esm/Client.mjs +5 -0
  134. package/dist/esm/api/resources/index.d.mts +4 -0
  135. package/dist/esm/api/resources/index.mjs +4 -0
  136. package/dist/esm/api/resources/internalOrganizations/exports.d.mts +1 -0
  137. package/dist/esm/api/resources/internalOrganizations/exports.mjs +2 -0
  138. package/dist/esm/api/resources/internalOrganizations/index.d.mts +1 -0
  139. package/dist/esm/api/resources/internalOrganizations/index.mjs +1 -0
  140. package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceData.d.mts +11 -0
  141. package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceData.mjs +2 -0
  142. package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceResponse.d.mts +7 -0
  143. package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceResponse.mjs +2 -0
  144. package/dist/esm/api/resources/internalOrganizations/types/EnrolledReward.d.mts +6 -0
  145. package/dist/esm/api/resources/internalOrganizations/types/EnrolledReward.mjs +6 -0
  146. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.d.mts +10 -0
  147. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.mjs +2 -0
  148. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.d.mts +11 -0
  149. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.mjs +11 -0
  150. package/dist/esm/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.d.mts +9 -0
  151. package/dist/esm/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.mjs +2 -0
  152. package/dist/esm/api/resources/internalOrganizations/types/index.d.mts +6 -0
  153. package/dist/esm/api/resources/internalOrganizations/types/index.mjs +6 -0
  154. package/dist/esm/api/resources/organizations/client/Client.d.mts +35 -0
  155. package/dist/esm/api/resources/organizations/client/Client.mjs +89 -0
  156. package/dist/esm/api/resources/organizations/client/index.d.mts +1 -0
  157. package/dist/esm/api/resources/organizations/client/index.mjs +1 -0
  158. package/dist/esm/api/resources/organizations/exports.d.mts +3 -0
  159. package/dist/esm/api/resources/organizations/exports.mjs +4 -0
  160. package/dist/esm/api/resources/organizations/index.d.mts +3 -0
  161. package/dist/esm/api/resources/organizations/index.mjs +3 -0
  162. package/dist/esm/api/resources/organizations/resources/children/client/Client.d.mts +113 -0
  163. package/dist/esm/api/resources/organizations/resources/children/client/Client.mjs +345 -0
  164. package/dist/esm/api/resources/organizations/resources/children/client/index.d.mts +1 -0
  165. package/dist/esm/api/resources/organizations/resources/children/client/index.mjs +1 -0
  166. package/dist/esm/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.d.mts +10 -0
  167. package/dist/esm/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.mjs +2 -0
  168. package/dist/esm/api/resources/organizations/resources/children/client/requests/index.d.mts +1 -0
  169. package/dist/esm/api/resources/organizations/resources/children/client/requests/index.mjs +1 -0
  170. package/dist/esm/api/resources/organizations/resources/children/exports.d.mts +2 -0
  171. package/dist/esm/api/resources/organizations/resources/children/exports.mjs +3 -0
  172. package/dist/esm/api/resources/organizations/resources/children/index.d.mts +2 -0
  173. package/dist/esm/api/resources/organizations/resources/children/index.mjs +2 -0
  174. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.mts +11 -0
  175. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.mjs +2 -0
  176. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.d.mts +18 -0
  177. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.mjs +2 -0
  178. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestBody.d.mts +8 -0
  179. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestBody.mjs +2 -0
  180. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestData.d.mts +10 -0
  181. package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestData.mjs +2 -0
  182. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.mts +21 -0
  183. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.mjs +2 -0
  184. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestBody.d.mts +8 -0
  185. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestBody.mjs +2 -0
  186. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestData.d.mts +10 -0
  187. package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestData.mjs +2 -0
  188. package/dist/esm/api/resources/organizations/resources/children/types/index.d.mts +7 -0
  189. package/dist/esm/api/resources/organizations/resources/children/types/index.mjs +7 -0
  190. package/dist/esm/api/resources/organizations/resources/index.d.mts +6 -0
  191. package/dist/esm/api/resources/organizations/resources/index.mjs +6 -0
  192. package/dist/esm/api/resources/organizations/resources/placements/client/Client.d.mts +131 -0
  193. package/dist/esm/api/resources/organizations/resources/placements/client/Client.mjs +372 -0
  194. package/dist/esm/api/resources/organizations/resources/placements/client/index.d.mts +1 -0
  195. package/dist/esm/api/resources/organizations/resources/placements/client/index.mjs +1 -0
  196. package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.mts +10 -0
  197. package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.mjs +2 -0
  198. package/dist/esm/api/resources/organizations/resources/placements/client/requests/index.d.mts +1 -0
  199. package/dist/esm/api/resources/organizations/resources/placements/client/requests/index.mjs +1 -0
  200. package/dist/esm/api/resources/organizations/resources/placements/exports.d.mts +2 -0
  201. package/dist/esm/api/resources/organizations/resources/placements/exports.mjs +3 -0
  202. package/dist/esm/api/resources/organizations/resources/placements/index.d.mts +2 -0
  203. package/dist/esm/api/resources/organizations/resources/placements/index.mjs +2 -0
  204. package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.d.mts +14 -0
  205. package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.mjs +2 -0
  206. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.d.mts +7 -0
  207. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.mjs +7 -0
  208. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.mts +15 -0
  209. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.mjs +2 -0
  210. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.mts +8 -0
  211. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.mjs +2 -0
  212. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +13 -0
  213. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.mjs +2 -0
  214. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.mts +33 -0
  215. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.mjs +2 -0
  216. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.d.mts +19 -0
  217. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.mjs +2 -0
  218. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.d.mts +8 -0
  219. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.mjs +2 -0
  220. package/dist/esm/api/resources/organizations/resources/placements/types/DayOfWeek.d.mts +11 -0
  221. package/dist/esm/api/resources/organizations/resources/placements/types/DayOfWeek.mjs +11 -0
  222. package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.mts +15 -0
  223. package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.mjs +2 -0
  224. package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementData.d.mts +9 -0
  225. package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementData.mjs +2 -0
  226. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +42 -0
  227. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.mjs +2 -0
  228. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.d.mts +11 -0
  229. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.mjs +2 -0
  230. package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.d.mts +16 -0
  231. package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.mjs +2 -0
  232. package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.d.mts +9 -0
  233. package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.mjs +2 -0
  234. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.d.mts +15 -0
  235. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.mjs +2 -0
  236. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.mts +8 -0
  237. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.mjs +2 -0
  238. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +13 -0
  239. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.mjs +2 -0
  240. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.d.mts +8 -0
  241. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.mjs +2 -0
  242. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.d.mts +20 -0
  243. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.mjs +2 -0
  244. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.d.mts +8 -0
  245. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.mjs +2 -0
  246. package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +21 -0
  247. package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +21 -0
  248. package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.d.mts +30 -0
  249. package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.mjs +2 -0
  250. package/dist/esm/api/resources/organizations/types/ExternalOrganizationResponse.d.mts +10 -0
  251. package/dist/esm/api/resources/organizations/types/ExternalOrganizationResponse.mjs +2 -0
  252. package/dist/esm/api/resources/organizations/types/index.d.mts +2 -0
  253. package/dist/esm/api/resources/organizations/types/index.mjs +2 -0
  254. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +21 -0
  255. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +75 -0
  256. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.mts +16 -0
  257. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.mjs +2 -0
  258. package/dist/esm/api/resources/users/resources/rewards/client/requests/index.d.mts +1 -0
  259. package/dist/esm/version.d.mts +1 -1
  260. package/dist/esm/version.mjs +1 -1
  261. package/package.json +34 -1
  262. package/reference.md +909 -0
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ChildOrganizationListResponse.js"), exports);
18
+ __exportStar(require("./CreateChildAttributes.js"), exports);
19
+ __exportStar(require("./CreateChildRequestBody.js"), exports);
20
+ __exportStar(require("./CreateChildRequestData.js"), exports);
21
+ __exportStar(require("./UpdateChildAttributes.js"), exports);
22
+ __exportStar(require("./UpdateChildRequestBody.js"), exports);
23
+ __exportStar(require("./UpdateChildRequestData.js"), exports);
@@ -0,0 +1,6 @@
1
+ export * from "./children/client/requests/index.js";
2
+ export * as children from "./children/index.js";
3
+ export * from "./children/types/index.js";
4
+ export * from "./placements/client/requests/index.js";
5
+ export * as placements from "./placements/index.js";
6
+ export * from "./placements/types/index.js";
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.placements = exports.children = void 0;
40
+ __exportStar(require("./children/client/requests/index.js"), exports);
41
+ exports.children = __importStar(require("./children/index.js"));
42
+ __exportStar(require("./children/types/index.js"), exports);
43
+ __exportStar(require("./placements/client/requests/index.js"), exports);
44
+ exports.placements = __importStar(require("./placements/index.js"));
45
+ __exportStar(require("./placements/types/index.js"), exports);
@@ -0,0 +1,131 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as KardApi from "../../../../../index.js";
5
+ export declare namespace PlacementsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PlacementsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PlacementsClient.Options>;
12
+ constructor(options?: PlacementsClient.Options);
13
+ /**
14
+ * Create a placement for the organization. Use type "placementMainPage" for main-page placements (requires name and availableSlots) or "placementPushNotification" for push-notification placements (requires name and cadence; availableSlots is automatically set to 1).
15
+ *
16
+ * @param {string} organizationId - Unique identifier of the organization
17
+ * @param {KardApi.organizations.CreatePlacementRequestBody} request
18
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
19
+ *
20
+ * @throws {@link KardApi.UnauthorizedError}
21
+ * @throws {@link KardApi.ForbiddenError}
22
+ * @throws {@link KardApi.InvalidRequest}
23
+ * @throws {@link KardApi.DoesNotExistError}
24
+ * @throws {@link KardApi.InternalServerError}
25
+ *
26
+ * @example
27
+ * await client.organizations.placements.create("org-123", {
28
+ * data: {
29
+ * type: "placementMainPage",
30
+ * attributes: {
31
+ * name: "Homepage Banner",
32
+ * availableSlots: 5
33
+ * }
34
+ * }
35
+ * })
36
+ *
37
+ * @example
38
+ * await client.organizations.placements.create("org-123", {
39
+ * data: {
40
+ * type: "placementPushNotification",
41
+ * attributes: {
42
+ * name: "Daily Deal Alert",
43
+ * cadence: {
44
+ * frequency: "DAILY",
45
+ * timeOfDay: "09:00"
46
+ * }
47
+ * }
48
+ * }
49
+ * })
50
+ */
51
+ create(organizationId: string, request: KardApi.organizations.CreatePlacementRequestBody, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementFormatUnion>;
52
+ private __create;
53
+ /**
54
+ * List placements belonging to the authenticated organization
55
+ *
56
+ * @param {string} organizationId - Unique identifier of the organization
57
+ * @param {KardApi.organizations.ListPlacementsRequest} request
58
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link KardApi.UnauthorizedError}
61
+ * @throws {@link KardApi.ForbiddenError}
62
+ * @throws {@link KardApi.DoesNotExistError}
63
+ * @throws {@link KardApi.InternalServerError}
64
+ *
65
+ * @example
66
+ * await client.organizations.placements.list("organizationId")
67
+ */
68
+ list(organizationId: string, request?: KardApi.organizations.ListPlacementsRequest, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementListResponse>;
69
+ private __list;
70
+ /**
71
+ * Retrieve a specific placement
72
+ *
73
+ * @param {string} organizationId - Unique identifier of the organization
74
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
75
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link KardApi.UnauthorizedError}
78
+ * @throws {@link KardApi.ForbiddenError}
79
+ * @throws {@link KardApi.DoesNotExistError}
80
+ * @throws {@link KardApi.InternalServerError}
81
+ *
82
+ * @example
83
+ * await client.organizations.placements.get("organizationId", "placementId")
84
+ */
85
+ get(organizationId: string, placementId: string, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementFormatUnion>;
86
+ private __get;
87
+ /**
88
+ * Replace a placement. All fields must be provided. Use type "placementMainPage" or "placementPushNotification" to set the placement kind. If the type is "placementPushNotification", availableSlots is automatically set to 1.
89
+ *
90
+ * @param {string} organizationId - Unique identifier of the organization
91
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
92
+ * @param {KardApi.organizations.UpdatePlacementRequestBody} request
93
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
94
+ *
95
+ * @throws {@link KardApi.UnauthorizedError}
96
+ * @throws {@link KardApi.ForbiddenError}
97
+ * @throws {@link KardApi.InvalidRequest}
98
+ * @throws {@link KardApi.DoesNotExistError}
99
+ * @throws {@link KardApi.InternalServerError}
100
+ *
101
+ * @example
102
+ * await client.organizations.placements.update("organizationId", "placementId", {
103
+ * data: {
104
+ * type: "placementMainPage",
105
+ * attributes: {
106
+ * name: "name",
107
+ * availableSlots: 1
108
+ * }
109
+ * }
110
+ * })
111
+ */
112
+ update(organizationId: string, placementId: string, request: KardApi.organizations.UpdatePlacementRequestBody, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementFormatUnion>;
113
+ private __update;
114
+ /**
115
+ * Delete a placement
116
+ *
117
+ * @param {string} organizationId - Unique identifier of the organization
118
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
119
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
120
+ *
121
+ * @throws {@link KardApi.UnauthorizedError}
122
+ * @throws {@link KardApi.ForbiddenError}
123
+ * @throws {@link KardApi.DoesNotExistError}
124
+ * @throws {@link KardApi.InternalServerError}
125
+ *
126
+ * @example
127
+ * await client.organizations.placements.delete("organizationId", "placementId")
128
+ */
129
+ delete(organizationId: string, placementId: string, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.DeleteResourceResponse>;
130
+ private __delete;
131
+ }
@@ -0,0 +1,409 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.PlacementsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const KardApi = __importStar(require("../../../../../index.js"));
54
+ class PlacementsClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Create a placement for the organization. Use type "placementMainPage" for main-page placements (requires name and availableSlots) or "placementPushNotification" for push-notification placements (requires name and cadence; availableSlots is automatically set to 1).
60
+ *
61
+ * @param {string} organizationId - Unique identifier of the organization
62
+ * @param {KardApi.organizations.CreatePlacementRequestBody} request
63
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link KardApi.UnauthorizedError}
66
+ * @throws {@link KardApi.ForbiddenError}
67
+ * @throws {@link KardApi.InvalidRequest}
68
+ * @throws {@link KardApi.DoesNotExistError}
69
+ * @throws {@link KardApi.InternalServerError}
70
+ *
71
+ * @example
72
+ * await client.organizations.placements.create("org-123", {
73
+ * data: {
74
+ * type: "placementMainPage",
75
+ * attributes: {
76
+ * name: "Homepage Banner",
77
+ * availableSlots: 5
78
+ * }
79
+ * }
80
+ * })
81
+ *
82
+ * @example
83
+ * await client.organizations.placements.create("org-123", {
84
+ * data: {
85
+ * type: "placementPushNotification",
86
+ * attributes: {
87
+ * name: "Daily Deal Alert",
88
+ * cadence: {
89
+ * frequency: "DAILY",
90
+ * timeOfDay: "09:00"
91
+ * }
92
+ * }
93
+ * }
94
+ * })
95
+ */
96
+ create(organizationId, request, requestOptions) {
97
+ return core.HttpResponsePromise.fromPromise(this.__create(organizationId, request, requestOptions));
98
+ }
99
+ __create(organizationId, request, requestOptions) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
102
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
103
+ 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);
104
+ const _response = yield core.fetcher({
105
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/placements`),
106
+ method: "POST",
107
+ headers: _headers,
108
+ contentType: "application/json",
109
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
110
+ requestType: "json",
111
+ body: request,
112
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
113
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
114
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
115
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
116
+ logging: this._options.logging,
117
+ });
118
+ if (_response.ok) {
119
+ return {
120
+ data: _response.body,
121
+ rawResponse: _response.rawResponse,
122
+ };
123
+ }
124
+ if (_response.error.reason === "status-code") {
125
+ switch (_response.error.statusCode) {
126
+ case 401:
127
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
128
+ case 403:
129
+ throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
130
+ case 400:
131
+ throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
132
+ case 404:
133
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
134
+ case 500:
135
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
136
+ default:
137
+ throw new errors.KardApiError({
138
+ statusCode: _response.error.statusCode,
139
+ body: _response.error.body,
140
+ rawResponse: _response.rawResponse,
141
+ });
142
+ }
143
+ }
144
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/placements");
145
+ });
146
+ }
147
+ /**
148
+ * List placements belonging to the authenticated organization
149
+ *
150
+ * @param {string} organizationId - Unique identifier of the organization
151
+ * @param {KardApi.organizations.ListPlacementsRequest} request
152
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link KardApi.UnauthorizedError}
155
+ * @throws {@link KardApi.ForbiddenError}
156
+ * @throws {@link KardApi.DoesNotExistError}
157
+ * @throws {@link KardApi.InternalServerError}
158
+ *
159
+ * @example
160
+ * await client.organizations.placements.list("organizationId")
161
+ */
162
+ list(organizationId, request = {}, requestOptions) {
163
+ return core.HttpResponsePromise.fromPromise(this.__list(organizationId, request, requestOptions));
164
+ }
165
+ __list(organizationId_1) {
166
+ return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
167
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
168
+ const { "page[after]": pageAfter, "page[size]": pageSize } = request;
169
+ const _queryParams = {
170
+ "page[after]": pageAfter,
171
+ "page[size]": pageSize,
172
+ };
173
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
174
+ 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);
175
+ const _response = yield core.fetcher({
176
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/placements`),
177
+ method: "GET",
178
+ headers: _headers,
179
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
180
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
181
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
182
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
183
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
184
+ logging: this._options.logging,
185
+ });
186
+ if (_response.ok) {
187
+ return {
188
+ data: _response.body,
189
+ rawResponse: _response.rawResponse,
190
+ };
191
+ }
192
+ if (_response.error.reason === "status-code") {
193
+ switch (_response.error.statusCode) {
194
+ case 401:
195
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
196
+ case 403:
197
+ throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
198
+ case 404:
199
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
200
+ case 500:
201
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
202
+ default:
203
+ throw new errors.KardApiError({
204
+ statusCode: _response.error.statusCode,
205
+ body: _response.error.body,
206
+ rawResponse: _response.rawResponse,
207
+ });
208
+ }
209
+ }
210
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/placements");
211
+ });
212
+ }
213
+ /**
214
+ * Retrieve a specific placement
215
+ *
216
+ * @param {string} organizationId - Unique identifier of the organization
217
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
218
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
219
+ *
220
+ * @throws {@link KardApi.UnauthorizedError}
221
+ * @throws {@link KardApi.ForbiddenError}
222
+ * @throws {@link KardApi.DoesNotExistError}
223
+ * @throws {@link KardApi.InternalServerError}
224
+ *
225
+ * @example
226
+ * await client.organizations.placements.get("organizationId", "placementId")
227
+ */
228
+ get(organizationId, placementId, requestOptions) {
229
+ return core.HttpResponsePromise.fromPromise(this.__get(organizationId, placementId, requestOptions));
230
+ }
231
+ __get(organizationId, placementId, requestOptions) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
234
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
235
+ 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);
236
+ const _response = yield core.fetcher({
237
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/placements/${core.url.encodePathParam(placementId)}`),
238
+ method: "GET",
239
+ headers: _headers,
240
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
241
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
242
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
243
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
245
+ logging: this._options.logging,
246
+ });
247
+ if (_response.ok) {
248
+ return {
249
+ data: _response.body,
250
+ rawResponse: _response.rawResponse,
251
+ };
252
+ }
253
+ if (_response.error.reason === "status-code") {
254
+ switch (_response.error.statusCode) {
255
+ case 401:
256
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
257
+ case 403:
258
+ throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
259
+ case 404:
260
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
261
+ case 500:
262
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
263
+ default:
264
+ throw new errors.KardApiError({
265
+ statusCode: _response.error.statusCode,
266
+ body: _response.error.body,
267
+ rawResponse: _response.rawResponse,
268
+ });
269
+ }
270
+ }
271
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/placements/{placementId}");
272
+ });
273
+ }
274
+ /**
275
+ * Replace a placement. All fields must be provided. Use type "placementMainPage" or "placementPushNotification" to set the placement kind. If the type is "placementPushNotification", availableSlots is automatically set to 1.
276
+ *
277
+ * @param {string} organizationId - Unique identifier of the organization
278
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
279
+ * @param {KardApi.organizations.UpdatePlacementRequestBody} request
280
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
281
+ *
282
+ * @throws {@link KardApi.UnauthorizedError}
283
+ * @throws {@link KardApi.ForbiddenError}
284
+ * @throws {@link KardApi.InvalidRequest}
285
+ * @throws {@link KardApi.DoesNotExistError}
286
+ * @throws {@link KardApi.InternalServerError}
287
+ *
288
+ * @example
289
+ * await client.organizations.placements.update("organizationId", "placementId", {
290
+ * data: {
291
+ * type: "placementMainPage",
292
+ * attributes: {
293
+ * name: "name",
294
+ * availableSlots: 1
295
+ * }
296
+ * }
297
+ * })
298
+ */
299
+ update(organizationId, placementId, request, requestOptions) {
300
+ return core.HttpResponsePromise.fromPromise(this.__update(organizationId, placementId, request, requestOptions));
301
+ }
302
+ __update(organizationId, placementId, request, requestOptions) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
305
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
306
+ 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);
307
+ const _response = yield core.fetcher({
308
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/placements/${core.url.encodePathParam(placementId)}`),
309
+ method: "PUT",
310
+ headers: _headers,
311
+ contentType: "application/json",
312
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
313
+ requestType: "json",
314
+ body: request,
315
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
316
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
317
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
318
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
319
+ logging: this._options.logging,
320
+ });
321
+ if (_response.ok) {
322
+ return {
323
+ data: _response.body,
324
+ rawResponse: _response.rawResponse,
325
+ };
326
+ }
327
+ if (_response.error.reason === "status-code") {
328
+ switch (_response.error.statusCode) {
329
+ case 401:
330
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
331
+ case 403:
332
+ throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
333
+ case 400:
334
+ throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
335
+ case 404:
336
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
337
+ case 500:
338
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
339
+ default:
340
+ throw new errors.KardApiError({
341
+ statusCode: _response.error.statusCode,
342
+ body: _response.error.body,
343
+ rawResponse: _response.rawResponse,
344
+ });
345
+ }
346
+ }
347
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/v2/issuers/{organizationId}/placements/{placementId}");
348
+ });
349
+ }
350
+ /**
351
+ * Delete a placement
352
+ *
353
+ * @param {string} organizationId - Unique identifier of the organization
354
+ * @param {string} placementId - Unique identifier of the placement (UUID v7)
355
+ * @param {PlacementsClient.RequestOptions} requestOptions - Request-specific configuration.
356
+ *
357
+ * @throws {@link KardApi.UnauthorizedError}
358
+ * @throws {@link KardApi.ForbiddenError}
359
+ * @throws {@link KardApi.DoesNotExistError}
360
+ * @throws {@link KardApi.InternalServerError}
361
+ *
362
+ * @example
363
+ * await client.organizations.placements.delete("organizationId", "placementId")
364
+ */
365
+ delete(organizationId, placementId, requestOptions) {
366
+ return core.HttpResponsePromise.fromPromise(this.__delete(organizationId, placementId, requestOptions));
367
+ }
368
+ __delete(organizationId, placementId, requestOptions) {
369
+ return __awaiter(this, void 0, void 0, function* () {
370
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
371
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
372
+ 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);
373
+ const _response = yield core.fetcher({
374
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/placements/${core.url.encodePathParam(placementId)}`),
375
+ method: "DELETE",
376
+ headers: _headers,
377
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
378
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
379
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
380
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
381
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
382
+ logging: this._options.logging,
383
+ });
384
+ if (_response.ok) {
385
+ return { data: _response.body, rawResponse: _response.rawResponse };
386
+ }
387
+ if (_response.error.reason === "status-code") {
388
+ switch (_response.error.statusCode) {
389
+ case 401:
390
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
391
+ case 403:
392
+ throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
393
+ case 404:
394
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
395
+ case 500:
396
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
397
+ default:
398
+ throw new errors.KardApiError({
399
+ statusCode: _response.error.statusCode,
400
+ body: _response.error.body,
401
+ rawResponse: _response.rawResponse,
402
+ });
403
+ }
404
+ }
405
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v2/issuers/{organizationId}/placements/{placementId}");
406
+ });
407
+ }
408
+ }
409
+ exports.PlacementsClient = PlacementsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface ListPlacementsRequest {
6
+ /** Cursor value for the next page of results */
7
+ "page[after]"?: string;
8
+ /** Maximum number of records to return [1 - 200] (default = 200) */
9
+ "page[size]"?: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });