@paddle/paddle-node-sdk 2.0.0-rc.0 → 2.0.0-rc.2

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 (304) hide show
  1. package/CHANGELOG.md +27 -7
  2. package/dist/cjs/entities/customer/auth-token.js +10 -0
  3. package/dist/cjs/entities/customer/index.js +1 -0
  4. package/dist/cjs/entities/index.js +5 -0
  5. package/dist/cjs/entities/notification-settings/notification-settings.js +1 -0
  6. package/dist/cjs/entities/payment-method/index.js +18 -0
  7. package/dist/cjs/entities/payment-method/payment-method-collection.js +11 -0
  8. package/dist/cjs/entities/payment-method/payment-method.js +18 -0
  9. package/dist/cjs/entities/shared/index.js +3 -0
  10. package/dist/cjs/entities/shared/paypal.js +10 -0
  11. package/dist/cjs/entities/shared/simulation-event-request.js +9 -0
  12. package/dist/cjs/entities/shared/simulation-event-response.js +10 -0
  13. package/dist/cjs/entities/simulation/index.js +18 -0
  14. package/dist/cjs/entities/simulation/simulation-collection.js +11 -0
  15. package/dist/cjs/entities/simulation/simulation.js +18 -0
  16. package/dist/cjs/entities/simulation-run/index.js +18 -0
  17. package/dist/cjs/entities/simulation-run/simulation-run-collection.js +11 -0
  18. package/dist/cjs/entities/simulation-run/simulation-run.js +16 -0
  19. package/dist/cjs/entities/simulation-run-event/index.js +18 -0
  20. package/dist/cjs/entities/simulation-run-event/simulation-run-event-collection.js +11 -0
  21. package/dist/cjs/entities/simulation-run-event/simulation-run-event.js +21 -0
  22. package/dist/cjs/entities/simulation-types/index.js +17 -0
  23. package/dist/cjs/entities/simulation-types/simulation-type.js +14 -0
  24. package/dist/cjs/enums/index.js +5 -0
  25. package/dist/cjs/enums/notification-settings/index.js +1 -0
  26. package/dist/cjs/enums/notification-settings/traffic-source.js +2 -0
  27. package/dist/cjs/enums/payment-method/deletion-reason.js +2 -0
  28. package/dist/cjs/enums/payment-method/index.js +19 -0
  29. package/dist/cjs/enums/payment-method/origin.js +2 -0
  30. package/dist/cjs/enums/payment-method/type.js +2 -0
  31. package/dist/cjs/enums/simulation/index.js +17 -0
  32. package/dist/cjs/enums/simulation/simulation-scenario-type.js +2 -0
  33. package/dist/cjs/enums/simulation-run/index.js +17 -0
  34. package/dist/cjs/enums/simulation-run/simulation-run-status.js +2 -0
  35. package/dist/cjs/enums/simulation-run-event/index.js +17 -0
  36. package/dist/cjs/enums/simulation-run-event/simulation-run-event-status.js +2 -0
  37. package/dist/cjs/enums/simulation-type/index.js +17 -0
  38. package/dist/cjs/enums/simulation-type/simulation-kind.js +2 -0
  39. package/dist/cjs/notifications/entities/index.js +1 -0
  40. package/dist/cjs/notifications/entities/payment-method/index.js +18 -0
  41. package/dist/cjs/notifications/entities/payment-method/payment-method-deleted-notification.js +16 -0
  42. package/dist/cjs/notifications/entities/payment-method/payment-method-notification.js +15 -0
  43. package/dist/cjs/notifications/entities/subscription/index.js +1 -0
  44. package/dist/cjs/notifications/entities/subscription/subscription-created-notification.js +42 -0
  45. package/dist/cjs/notifications/entities/subscription/subscription-notification.js +0 -1
  46. package/dist/cjs/notifications/events/index.js +1 -0
  47. package/dist/cjs/notifications/events/payment-method/index.js +18 -0
  48. package/dist/cjs/notifications/events/payment-method/payment-method-deleted-event.js +14 -0
  49. package/dist/cjs/notifications/events/payment-method/payment-method-saved-event.js +14 -0
  50. package/dist/cjs/notifications/events/subscription/subscription-created-event.js +1 -1
  51. package/dist/cjs/notifications/helpers/types.js +2 -0
  52. package/dist/cjs/notifications/helpers/webhooks.js +4 -0
  53. package/dist/cjs/notifications/types/index.js +1 -0
  54. package/dist/cjs/notifications/types/payment-method/index.js +18 -0
  55. package/dist/cjs/notifications/types/payment-method/payment-method-deleted-notification-response.js +2 -0
  56. package/dist/cjs/notifications/types/payment-method/payment-method-notification-response.js +2 -0
  57. package/dist/cjs/notifications/types/subscription/index.js +1 -0
  58. package/dist/cjs/notifications/types/subscription/subscription-created-notification-response.js +2 -0
  59. package/dist/cjs/paddle.js +5 -0
  60. package/dist/cjs/resources/customers/index.js +11 -0
  61. package/dist/cjs/resources/index.js +5 -0
  62. package/dist/cjs/resources/payment-methods/index.js +67 -0
  63. package/dist/cjs/resources/payment-methods/operations/index.js +17 -0
  64. package/dist/cjs/resources/payment-methods/operations/list-customer-payment-method-query-parameters.js +2 -0
  65. package/dist/cjs/resources/simulation-run-events/index.js +69 -0
  66. package/dist/cjs/resources/simulation-run-events/operations/index.js +17 -0
  67. package/dist/cjs/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.js +2 -0
  68. package/dist/cjs/resources/simulation-runs/index.js +66 -0
  69. package/dist/cjs/resources/simulation-runs/operations/get-simulation-run-query-parameters.js +2 -0
  70. package/dist/cjs/resources/simulation-runs/operations/index.js +18 -0
  71. package/dist/cjs/resources/simulation-runs/operations/list-simulation-run-query-parameters.js +2 -0
  72. package/dist/cjs/resources/simulation-types/index.js +27 -0
  73. package/dist/cjs/resources/simulations/index.js +69 -0
  74. package/dist/cjs/resources/simulations/operations/create-simulation-request-body.js +2 -0
  75. package/dist/cjs/resources/simulations/operations/index.js +19 -0
  76. package/dist/cjs/resources/simulations/operations/list-simulation-query-parameters.js +2 -0
  77. package/dist/cjs/resources/simulations/operations/update-simulation-request-body.js +2 -0
  78. package/dist/cjs/types/customer/auth-token-response.js +2 -0
  79. package/dist/cjs/types/customer/index.js +1 -0
  80. package/dist/cjs/types/index.js +5 -0
  81. package/dist/cjs/types/payment-method/index.js +17 -0
  82. package/dist/cjs/types/payment-method/payment-method.js +2 -0
  83. package/dist/cjs/types/shared/index.js +4 -0
  84. package/dist/cjs/types/shared/paypal.js +2 -0
  85. package/dist/cjs/types/shared/simulation-event-request.js +2 -0
  86. package/dist/cjs/types/shared/simulation-event-response.js +2 -0
  87. package/dist/cjs/types/shared/simulation-payload.js +2 -0
  88. package/dist/cjs/types/simulation/index.js +17 -0
  89. package/dist/cjs/types/simulation/simulation-response.js +2 -0
  90. package/dist/cjs/types/simulation-run/index.js +17 -0
  91. package/dist/cjs/types/simulation-run/simulation-run-event.js +2 -0
  92. package/dist/cjs/types/simulation-run/simulation-run-response.js +2 -0
  93. package/dist/cjs/types/simulation-run-event/index.js +17 -0
  94. package/dist/cjs/types/simulation-run-event/simulation-run-event-response.js +2 -0
  95. package/dist/cjs/types/simulation-type/index.js +17 -0
  96. package/dist/cjs/types/simulation-type/simulation-type.js +2 -0
  97. package/dist/cjs/version.js +1 -1
  98. package/dist/esm/entities/customer/auth-token.js +6 -0
  99. package/dist/esm/entities/customer/index.js +1 -0
  100. package/dist/esm/entities/index.js +5 -0
  101. package/dist/esm/entities/notification-settings/notification-settings.js +1 -0
  102. package/dist/esm/entities/payment-method/index.js +2 -0
  103. package/dist/esm/entities/payment-method/payment-method-collection.js +7 -0
  104. package/dist/esm/entities/payment-method/payment-method.js +14 -0
  105. package/dist/esm/entities/shared/index.js +3 -0
  106. package/dist/esm/entities/shared/paypal.js +6 -0
  107. package/dist/esm/entities/shared/simulation-event-request.js +5 -0
  108. package/dist/esm/entities/shared/simulation-event-response.js +6 -0
  109. package/dist/esm/entities/simulation/index.js +2 -0
  110. package/dist/esm/entities/simulation/simulation-collection.js +7 -0
  111. package/dist/esm/entities/simulation/simulation.js +14 -0
  112. package/dist/esm/entities/simulation-run/index.js +2 -0
  113. package/dist/esm/entities/simulation-run/simulation-run-collection.js +7 -0
  114. package/dist/esm/entities/simulation-run/simulation-run.js +12 -0
  115. package/dist/esm/entities/simulation-run-event/index.js +2 -0
  116. package/dist/esm/entities/simulation-run-event/simulation-run-event-collection.js +7 -0
  117. package/dist/esm/entities/simulation-run-event/simulation-run-event.js +17 -0
  118. package/dist/esm/entities/simulation-types/index.js +1 -0
  119. package/dist/esm/entities/simulation-types/simulation-type.js +10 -0
  120. package/dist/esm/enums/index.js +5 -0
  121. package/dist/esm/enums/notification-settings/index.js +1 -0
  122. package/dist/esm/enums/notification-settings/traffic-source.js +1 -0
  123. package/dist/esm/enums/payment-method/deletion-reason.js +1 -0
  124. package/dist/esm/enums/payment-method/index.js +3 -0
  125. package/dist/esm/enums/payment-method/origin.js +1 -0
  126. package/dist/esm/enums/payment-method/type.js +1 -0
  127. package/dist/esm/enums/simulation/index.js +1 -0
  128. package/dist/esm/enums/simulation/simulation-scenario-type.js +1 -0
  129. package/dist/esm/enums/simulation-run/index.js +1 -0
  130. package/dist/esm/enums/simulation-run/simulation-run-status.js +1 -0
  131. package/dist/esm/enums/simulation-run-event/index.js +1 -0
  132. package/dist/esm/enums/simulation-run-event/simulation-run-event-status.js +1 -0
  133. package/dist/esm/enums/simulation-type/index.js +1 -0
  134. package/dist/esm/enums/simulation-type/simulation-kind.js +1 -0
  135. package/dist/esm/notifications/entities/index.js +1 -0
  136. package/dist/esm/notifications/entities/payment-method/index.js +2 -0
  137. package/dist/esm/notifications/entities/payment-method/payment-method-deleted-notification.js +12 -0
  138. package/dist/esm/notifications/entities/payment-method/payment-method-notification.js +11 -0
  139. package/dist/esm/notifications/entities/subscription/index.js +1 -0
  140. package/dist/esm/notifications/entities/subscription/subscription-created-notification.js +38 -0
  141. package/dist/esm/notifications/entities/subscription/subscription-notification.js +0 -1
  142. package/dist/esm/notifications/events/index.js +1 -0
  143. package/dist/esm/notifications/events/payment-method/index.js +2 -0
  144. package/dist/esm/notifications/events/payment-method/payment-method-deleted-event.js +10 -0
  145. package/dist/esm/notifications/events/payment-method/payment-method-saved-event.js +10 -0
  146. package/dist/esm/notifications/events/subscription/subscription-created-event.js +2 -2
  147. package/dist/esm/notifications/helpers/types.js +2 -0
  148. package/dist/esm/notifications/helpers/webhooks.js +5 -1
  149. package/dist/esm/notifications/types/index.js +1 -0
  150. package/dist/esm/notifications/types/payment-method/index.js +2 -0
  151. package/dist/esm/notifications/types/payment-method/payment-method-deleted-notification-response.js +1 -0
  152. package/dist/esm/notifications/types/payment-method/payment-method-notification-response.js +1 -0
  153. package/dist/esm/notifications/types/subscription/index.js +1 -0
  154. package/dist/esm/notifications/types/subscription/subscription-created-notification-response.js +1 -0
  155. package/dist/esm/paddle.js +6 -1
  156. package/dist/esm/resources/customers/index.js +12 -1
  157. package/dist/esm/resources/index.js +5 -0
  158. package/dist/esm/resources/payment-methods/index.js +49 -0
  159. package/dist/esm/resources/payment-methods/operations/index.js +1 -0
  160. package/dist/esm/resources/payment-methods/operations/list-customer-payment-method-query-parameters.js +1 -0
  161. package/dist/esm/resources/simulation-run-events/index.js +51 -0
  162. package/dist/esm/resources/simulation-run-events/operations/index.js +1 -0
  163. package/dist/esm/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.js +1 -0
  164. package/dist/esm/resources/simulation-runs/index.js +48 -0
  165. package/dist/esm/resources/simulation-runs/operations/get-simulation-run-query-parameters.js +1 -0
  166. package/dist/esm/resources/simulation-runs/operations/index.js +2 -0
  167. package/dist/esm/resources/simulation-runs/operations/list-simulation-run-query-parameters.js +1 -0
  168. package/dist/esm/resources/simulation-types/index.js +23 -0
  169. package/dist/esm/resources/simulations/index.js +51 -0
  170. package/dist/esm/resources/simulations/operations/create-simulation-request-body.js +1 -0
  171. package/dist/esm/resources/simulations/operations/index.js +3 -0
  172. package/dist/esm/resources/simulations/operations/list-simulation-query-parameters.js +1 -0
  173. package/dist/esm/resources/simulations/operations/update-simulation-request-body.js +1 -0
  174. package/dist/esm/types/customer/auth-token-response.js +1 -0
  175. package/dist/esm/types/customer/index.js +1 -0
  176. package/dist/esm/types/index.js +5 -0
  177. package/dist/esm/types/payment-method/index.js +1 -0
  178. package/dist/esm/types/payment-method/payment-method.js +1 -0
  179. package/dist/esm/types/shared/index.js +4 -0
  180. package/dist/esm/types/shared/paypal.js +1 -0
  181. package/dist/esm/types/shared/simulation-event-request.js +1 -0
  182. package/dist/esm/types/shared/simulation-event-response.js +1 -0
  183. package/dist/esm/types/shared/simulation-payload.js +1 -0
  184. package/dist/esm/types/simulation/index.js +1 -0
  185. package/dist/esm/types/simulation/simulation-response.js +1 -0
  186. package/dist/esm/types/simulation-run/index.js +1 -0
  187. package/dist/esm/types/simulation-run/simulation-run-event.js +1 -0
  188. package/dist/esm/types/simulation-run/simulation-run-response.js +1 -0
  189. package/dist/esm/types/simulation-run-event/index.js +1 -0
  190. package/dist/esm/types/simulation-run-event/simulation-run-event-response.js +1 -0
  191. package/dist/esm/types/simulation-type/index.js +1 -0
  192. package/dist/esm/types/simulation-type/simulation-type.js +1 -0
  193. package/dist/esm/version.js +1 -1
  194. package/dist/types/entities/customer/auth-token.d.ts +6 -0
  195. package/dist/types/entities/customer/index.d.ts +1 -0
  196. package/dist/types/entities/index.d.ts +5 -0
  197. package/dist/types/entities/notification-settings/notification-settings.d.ts +2 -1
  198. package/dist/types/entities/payment-method/index.d.ts +2 -0
  199. package/dist/types/entities/payment-method/payment-method-collection.d.ts +6 -0
  200. package/dist/types/entities/payment-method/payment-method.d.ts +15 -0
  201. package/dist/types/entities/shared/index.d.ts +3 -0
  202. package/dist/types/entities/shared/paypal.d.ts +6 -0
  203. package/dist/types/entities/shared/simulation-event-request.d.ts +5 -0
  204. package/dist/types/entities/shared/simulation-event-response.d.ts +6 -0
  205. package/dist/types/entities/simulation/index.d.ts +2 -0
  206. package/dist/types/entities/simulation/simulation-collection.d.ts +6 -0
  207. package/dist/types/entities/simulation/simulation.d.ts +15 -0
  208. package/dist/types/entities/simulation-run/index.d.ts +2 -0
  209. package/dist/types/entities/simulation-run/simulation-run-collection.d.ts +6 -0
  210. package/dist/types/entities/simulation-run/simulation-run.d.ts +13 -0
  211. package/dist/types/entities/simulation-run-event/index.d.ts +2 -0
  212. package/dist/types/entities/simulation-run-event/simulation-run-event-collection.d.ts +6 -0
  213. package/dist/types/entities/simulation-run-event/simulation-run-event.d.ts +15 -0
  214. package/dist/types/entities/simulation-types/index.d.ts +1 -0
  215. package/dist/types/entities/simulation-types/simulation-type.d.ts +12 -0
  216. package/dist/types/enums/index.d.ts +5 -0
  217. package/dist/types/enums/notification-settings/index.d.ts +1 -0
  218. package/dist/types/enums/notification-settings/traffic-source.d.ts +1 -0
  219. package/dist/types/enums/payment-method/deletion-reason.d.ts +1 -0
  220. package/dist/types/enums/payment-method/index.d.ts +3 -0
  221. package/dist/types/enums/payment-method/origin.d.ts +1 -0
  222. package/dist/types/enums/payment-method/type.d.ts +1 -0
  223. package/dist/types/enums/simulation/index.d.ts +1 -0
  224. package/dist/types/enums/simulation/simulation-scenario-type.d.ts +1 -0
  225. package/dist/types/enums/simulation-run/index.d.ts +1 -0
  226. package/dist/types/enums/simulation-run/simulation-run-status.d.ts +1 -0
  227. package/dist/types/enums/simulation-run-event/index.d.ts +1 -0
  228. package/dist/types/enums/simulation-run-event/simulation-run-event-status.d.ts +1 -0
  229. package/dist/types/enums/simulation-type/index.d.ts +1 -0
  230. package/dist/types/enums/simulation-type/simulation-kind.d.ts +1 -0
  231. package/dist/types/notifications/entities/index.d.ts +1 -0
  232. package/dist/types/notifications/entities/payment-method/index.d.ts +2 -0
  233. package/dist/types/notifications/entities/payment-method/payment-method-deleted-notification.d.ts +13 -0
  234. package/dist/types/notifications/entities/payment-method/payment-method-notification.d.ts +12 -0
  235. package/dist/types/notifications/entities/subscription/index.d.ts +1 -0
  236. package/dist/types/notifications/entities/subscription/subscription-created-notification.d.ts +34 -0
  237. package/dist/types/notifications/entities/subscription/subscription-notification.d.ts +0 -1
  238. package/dist/types/notifications/events/index.d.ts +1 -0
  239. package/dist/types/notifications/events/payment-method/index.d.ts +2 -0
  240. package/dist/types/notifications/events/payment-method/payment-method-deleted-event.d.ts +10 -0
  241. package/dist/types/notifications/events/payment-method/payment-method-saved-event.d.ts +10 -0
  242. package/dist/types/notifications/events/subscription/subscription-activated-event.d.ts +1 -1
  243. package/dist/types/notifications/events/subscription/subscription-canceled-event.d.ts +1 -1
  244. package/dist/types/notifications/events/subscription/subscription-created-event.d.ts +4 -4
  245. package/dist/types/notifications/events/subscription/subscription-imported-event.d.ts +1 -1
  246. package/dist/types/notifications/events/subscription/subscription-past-due-event.d.ts +1 -1
  247. package/dist/types/notifications/events/subscription/subscription-paused-event.d.ts +1 -1
  248. package/dist/types/notifications/events/subscription/subscription-resumed-event.d.ts +1 -1
  249. package/dist/types/notifications/events/subscription/subscription-trialing-event.d.ts +1 -1
  250. package/dist/types/notifications/events/subscription/subscription-updated-event.d.ts +1 -1
  251. package/dist/types/notifications/helpers/types.d.ts +5 -3
  252. package/dist/types/notifications/types/index.d.ts +1 -0
  253. package/dist/types/notifications/types/payment-method/index.d.ts +2 -0
  254. package/dist/types/notifications/types/payment-method/payment-method-deleted-notification-response.d.ts +11 -0
  255. package/dist/types/notifications/types/payment-method/payment-method-notification-response.d.ts +10 -0
  256. package/dist/types/notifications/types/subscription/index.d.ts +1 -0
  257. package/dist/types/notifications/types/subscription/subscription-created-notification-response.d.ts +28 -0
  258. package/dist/types/notifications/types/subscription/subscription-notification-response.d.ts +0 -1
  259. package/dist/types/paddle.d.ts +6 -1
  260. package/dist/types/resources/customers/index.d.ts +2 -1
  261. package/dist/types/resources/index.d.ts +5 -0
  262. package/dist/types/resources/notification-settings/operations/create-notification-settings-request-body.d.ts +2 -1
  263. package/dist/types/resources/notification-settings/operations/list-notification-settings-query-parameters.d.ts +2 -0
  264. package/dist/types/resources/notification-settings/operations/update-notification-settings-request-body.d.ts +2 -0
  265. package/dist/types/resources/payment-methods/index.d.ts +9 -0
  266. package/dist/types/resources/payment-methods/operations/index.d.ts +1 -0
  267. package/dist/types/resources/payment-methods/operations/list-customer-payment-method-query-parameters.d.ts +7 -0
  268. package/dist/types/resources/simulation-run-events/index.d.ts +9 -0
  269. package/dist/types/resources/simulation-run-events/operations/index.d.ts +1 -0
  270. package/dist/types/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.d.ts +6 -0
  271. package/dist/types/resources/simulation-runs/index.d.ts +9 -0
  272. package/dist/types/resources/simulation-runs/operations/get-simulation-run-query-parameters.d.ts +3 -0
  273. package/dist/types/resources/simulation-runs/operations/index.d.ts +2 -0
  274. package/dist/types/resources/simulation-runs/operations/list-simulation-run-query-parameters.d.ts +7 -0
  275. package/dist/types/resources/simulation-types/index.d.ts +5 -0
  276. package/dist/types/resources/simulations/index.d.ts +10 -0
  277. package/dist/types/resources/simulations/operations/create-simulation-request-body.d.ts +10 -0
  278. package/dist/types/resources/simulations/operations/index.d.ts +3 -0
  279. package/dist/types/resources/simulations/operations/list-simulation-query-parameters.d.ts +9 -0
  280. package/dist/types/resources/simulations/operations/update-simulation-request-body.d.ts +12 -0
  281. package/dist/types/types/customer/auth-token-response.d.ts +4 -0
  282. package/dist/types/types/customer/index.d.ts +1 -0
  283. package/dist/types/types/events/events-response.d.ts +9 -3
  284. package/dist/types/types/index.d.ts +5 -0
  285. package/dist/types/types/notification-settings/notification-settings-response.d.ts +2 -1
  286. package/dist/types/types/payment-method/index.d.ts +1 -0
  287. package/dist/types/types/payment-method/payment-method.d.ts +13 -0
  288. package/dist/types/types/shared/index.d.ts +4 -0
  289. package/dist/types/types/shared/paypal.d.ts +4 -0
  290. package/dist/types/types/shared/simulation-event-request.d.ts +3 -0
  291. package/dist/types/types/shared/simulation-event-response.d.ts +4 -0
  292. package/dist/types/types/shared/simulation-payload.d.ts +58 -0
  293. package/dist/types/types/simulation/index.d.ts +1 -0
  294. package/dist/types/types/simulation/simulation-response.d.ts +13 -0
  295. package/dist/types/types/simulation-run/index.d.ts +1 -0
  296. package/dist/types/types/simulation-run/simulation-run-event.d.ts +17 -0
  297. package/dist/types/types/simulation-run/simulation-run-response.d.ts +11 -0
  298. package/dist/types/types/simulation-run-event/index.d.ts +1 -0
  299. package/dist/types/types/simulation-run-event/simulation-run-event-response.d.ts +13 -0
  300. package/dist/types/types/simulation-type/index.d.ts +1 -0
  301. package/dist/types/types/simulation-type/simulation-type.d.ts +10 -0
  302. package/dist/types/types/subscription/subscription-update-item.d.ts +1 -1
  303. package/dist/types/version.d.ts +1 -1
  304. package/package.json +1 -1
@@ -0,0 +1,38 @@
1
+ import { BillingDetailsNotification, ImportMetaNotification, TimePeriodNotification } from '../shared/index.js';
2
+ import { SubscriptionDiscountNotification } from './subscription-discount-notification.js';
3
+ import { SubscriptionItemNotification } from './subscription-item-notification.js';
4
+ import { SubscriptionScheduledChangeNotification } from './subscription-scheduled-change-notification.js';
5
+ import { SubscriptionTimePeriodNotification } from './subscription-time-period-notification.js';
6
+ export class SubscriptionCreatedNotification {
7
+ constructor(subscription) {
8
+ this.id = subscription.id;
9
+ this.status = subscription.status;
10
+ this.transactionId = subscription.transaction_id;
11
+ this.customerId = subscription.customer_id;
12
+ this.addressId = subscription.address_id;
13
+ this.businessId = subscription.business_id ? subscription.business_id : null;
14
+ this.currencyCode = subscription.currency_code;
15
+ this.createdAt = subscription.created_at;
16
+ this.updatedAt = subscription.updated_at;
17
+ this.startedAt = subscription.started_at ? subscription.started_at : null;
18
+ this.firstBilledAt = subscription.first_billed_at ? subscription.first_billed_at : null;
19
+ this.nextBilledAt = subscription.next_billed_at ? subscription.next_billed_at : null;
20
+ this.pausedAt = subscription.paused_at ? subscription.paused_at : null;
21
+ this.canceledAt = subscription.canceled_at ? subscription.canceled_at : null;
22
+ this.discount = subscription.discount ? new SubscriptionDiscountNotification(subscription.discount) : null;
23
+ this.collectionMode = subscription.collection_mode;
24
+ this.billingDetails = subscription.billing_details
25
+ ? new BillingDetailsNotification(subscription.billing_details)
26
+ : null;
27
+ this.currentBillingPeriod = subscription.current_billing_period
28
+ ? new SubscriptionTimePeriodNotification(subscription.current_billing_period)
29
+ : null;
30
+ this.billingCycle = new TimePeriodNotification(subscription.billing_cycle);
31
+ this.scheduledChange = subscription.scheduled_change
32
+ ? new SubscriptionScheduledChangeNotification(subscription.scheduled_change)
33
+ : null;
34
+ this.items = subscription.items.map((item) => new SubscriptionItemNotification(item));
35
+ this.customData = subscription.custom_data ? subscription.custom_data : null;
36
+ this.importMeta = subscription.import_meta ? new ImportMetaNotification(subscription.import_meta) : null;
37
+ }
38
+ }
@@ -7,7 +7,6 @@ export class SubscriptionNotification {
7
7
  constructor(subscription) {
8
8
  this.id = subscription.id;
9
9
  this.status = subscription.status;
10
- this.transactionId = subscription.transaction_id ? subscription.transaction_id : null;
11
10
  this.customerId = subscription.customer_id;
12
11
  this.addressId = subscription.address_id;
13
12
  this.businessId = subscription.business_id ? subscription.business_id : null;
@@ -3,6 +3,7 @@ export * from './adjustment/index.js';
3
3
  export * from './business/index.js';
4
4
  export * from './customer/index.js';
5
5
  export * from './discount/index.js';
6
+ export * from './payment-method/index.js';
6
7
  export * from './payout/index.js';
7
8
  export * from './price/index.js';
8
9
  export * from './product/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './payment-method-deleted-event.js';
2
+ export * from './payment-method-saved-event.js';
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { PaymentMethodDeletedNotification } from '../../entities/index.js';
3
+ import { EventName } from '../../helpers/index.js';
4
+ export class PaymentMethodDeletedEvent extends Event {
5
+ constructor(response) {
6
+ super(response);
7
+ this.eventType = EventName.PaymentMethodDeleted;
8
+ this.data = new PaymentMethodDeletedNotification(response.data);
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { PaymentMethodNotification } from '../../entities/index.js';
3
+ import { EventName } from '../../helpers/index.js';
4
+ export class PaymentMethodSavedEvent extends Event {
5
+ constructor(response) {
6
+ super(response);
7
+ this.eventType = EventName.PaymentMethodSaved;
8
+ this.data = new PaymentMethodNotification(response.data);
9
+ }
10
+ }
@@ -1,10 +1,10 @@
1
1
  import { Event } from '../../../entities/events/event.js';
2
2
  import { EventName } from '../../helpers/index.js';
3
- import { SubscriptionNotification } from '../../entities/index.js';
3
+ import { SubscriptionCreatedNotification } from '../../entities/index.js';
4
4
  export class SubscriptionCreatedEvent extends Event {
5
5
  constructor(response) {
6
6
  super(response);
7
7
  this.eventType = EventName.SubscriptionCreated;
8
- this.data = new SubscriptionNotification(response.data);
8
+ this.data = new SubscriptionCreatedNotification(response.data);
9
9
  }
10
10
  }
@@ -14,6 +14,8 @@ export var EventName;
14
14
  EventName["DiscountCreated"] = "discount.created";
15
15
  EventName["DiscountUpdated"] = "discount.updated";
16
16
  EventName["DiscountImported"] = "discount.imported";
17
+ EventName["PaymentMethodDeleted"] = "payment_method.deleted";
18
+ EventName["PaymentMethodSaved"] = "payment_method.saved";
17
19
  EventName["PayoutCreated"] = "payout.created";
18
20
  EventName["PayoutPaid"] = "payout.paid";
19
21
  EventName["PriceCreated"] = "price.created";
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { WebhooksValidator } from './webhooks-validator.js';
11
11
  import { EventName } from './types.js';
12
- import { AddressCreatedEvent, AddressImportedEvent, AddressUpdatedEvent, AdjustmentCreatedEvent, AdjustmentUpdatedEvent, BusinessCreatedEvent, BusinessImportedEvent, BusinessUpdatedEvent, CustomerCreatedEvent, CustomerImportedEvent, CustomerUpdatedEvent, DiscountCreatedEvent, DiscountImportedEvent, DiscountUpdatedEvent, PayoutCreatedEvent, PayoutPaidEvent, PriceCreatedEvent, PriceImportedEvent, PriceUpdatedEvent, ProductCreatedEvent, ProductImportedEvent, ProductUpdatedEvent, ReportCreatedEvent, ReportUpdatedEvent, SubscriptionActivatedEvent, SubscriptionCanceledEvent, SubscriptionCreatedEvent, SubscriptionImportedEvent, SubscriptionPastDueEvent, SubscriptionPausedEvent, SubscriptionResumedEvent, SubscriptionTrialingEvent, SubscriptionUpdatedEvent, TransactionBilledEvent, TransactionCanceledEvent, TransactionCompletedEvent, TransactionCreatedEvent, TransactionPaidEvent, TransactionPastDueEvent, TransactionPaymentFailedEvent, TransactionReadyEvent, TransactionUpdatedEvent, } from '../events/index.js';
12
+ import { AddressCreatedEvent, AddressImportedEvent, AddressUpdatedEvent, AdjustmentCreatedEvent, AdjustmentUpdatedEvent, BusinessCreatedEvent, BusinessImportedEvent, BusinessUpdatedEvent, CustomerCreatedEvent, CustomerImportedEvent, CustomerUpdatedEvent, DiscountCreatedEvent, DiscountImportedEvent, DiscountUpdatedEvent, PaymentMethodDeletedEvent, PaymentMethodSavedEvent, PayoutCreatedEvent, PayoutPaidEvent, PriceCreatedEvent, PriceImportedEvent, PriceUpdatedEvent, ProductCreatedEvent, ProductImportedEvent, ProductUpdatedEvent, ReportCreatedEvent, ReportUpdatedEvent, SubscriptionActivatedEvent, SubscriptionCanceledEvent, SubscriptionCreatedEvent, SubscriptionImportedEvent, SubscriptionPastDueEvent, SubscriptionPausedEvent, SubscriptionResumedEvent, SubscriptionTrialingEvent, SubscriptionUpdatedEvent, TransactionBilledEvent, TransactionCanceledEvent, TransactionCompletedEvent, TransactionCreatedEvent, TransactionPaidEvent, TransactionPastDueEvent, TransactionPaymentFailedEvent, TransactionReadyEvent, TransactionUpdatedEvent, } from '../events/index.js';
13
13
  import { Logger } from '../../internal/base/logger.js';
14
14
  export class Webhooks {
15
15
  unmarshal(requestBody, secretKey, signature) {
@@ -59,6 +59,10 @@ export class Webhooks {
59
59
  return new DiscountImportedEvent(data);
60
60
  case EventName.DiscountUpdated:
61
61
  return new DiscountUpdatedEvent(data);
62
+ case EventName.PaymentMethodDeleted:
63
+ return new PaymentMethodDeletedEvent(data);
64
+ case EventName.PaymentMethodSaved:
65
+ return new PaymentMethodSavedEvent(data);
62
66
  case EventName.PayoutCreated:
63
67
  return new PayoutCreatedEvent(data);
64
68
  case EventName.PayoutPaid:
@@ -7,6 +7,7 @@ export * from './business/index.js';
7
7
  export * from './subscription/index.js';
8
8
  export * from './address/index.js';
9
9
  export * from './discount/index.js';
10
+ export * from './payment-method/index.js';
10
11
  export * from './payout/index.js';
11
12
  export * from './report/index.js';
12
13
  export * from './shared/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './payment-method-deleted-notification-response.js';
2
+ export * from './payment-method-notification-response.js';
@@ -1,3 +1,4 @@
1
+ export * from './subscription-created-notification-response.js';
1
2
  export * from './subscription-discount-notification-response.js';
2
3
  export * from './subscription-time-period-notification-response.js';
3
4
  export * from './subscription-scheduled-change-notification-response.js';
@@ -1,6 +1,6 @@
1
1
  import { Client } from './internal/api/client.js';
2
2
  import { Environment, LogLevel } from './internal/index.js';
3
- import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SubscriptionsResource, TransactionsResource, } from './resources/index.js';
3
+ import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PaymentMethodsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SimulationTypesResource, SimulationsResource, SimulationRunsResource, SimulationRunEventsResource, SubscriptionsResource, TransactionsResource, } from './resources/index.js';
4
4
  import { EventsResource } from './resources/events/index.js';
5
5
  import { Webhooks } from './notifications/index.js';
6
6
  export class Paddle {
@@ -19,6 +19,7 @@ export class Paddle {
19
19
  this.businesses = new BusinessesResource(this.client);
20
20
  this.discounts = new DiscountsResource(this.client);
21
21
  this.subscriptions = new SubscriptionsResource(this.client);
22
+ this.paymentMethods = new PaymentMethodsResource(this.client);
22
23
  this.pricingPreview = new PricingPreviewResource(this.client);
23
24
  this.events = new EventsResource(this.client);
24
25
  this.webhooks = new Webhooks();
@@ -26,5 +27,9 @@ export class Paddle {
26
27
  this.notificationSettings = new NotificationSettingsResource(this.client);
27
28
  this.notifications = new NotificationsResource(this.client);
28
29
  this.reports = new ReportsResource(this.client);
30
+ this.simulationTypes = new SimulationTypesResource(this.client);
31
+ this.simulations = new SimulationsResource(this.client);
32
+ this.simulationRuns = new SimulationRunsResource(this.client);
33
+ this.simulationRunEvents = new SimulationRunEventsResource(this.client);
29
34
  }
30
35
  }
@@ -8,13 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js';
11
- import { CreditBalance, Customer, CustomerCollection } from '../../entities/index.js';
11
+ import { CreditBalance, Customer, CustomerCollection, AuthToken } from '../../entities/index.js';
12
12
  const CustomerPaths = {
13
13
  list: '/customers',
14
14
  create: '/customers',
15
15
  get: '/customers/{customer_id}',
16
16
  update: '/customers/{customer_id}',
17
17
  getCustomerBalance: '/customers/{customer_id}/credit-balances',
18
+ generate: '/customers/{customer_id}/auth-token',
18
19
  };
19
20
  export * from './operations/index.js';
20
21
  export class CustomersResource extends BaseResource {
@@ -65,4 +66,14 @@ export class CustomersResource extends BaseResource {
65
66
  return yield this.update(customerId, { status: 'archived' });
66
67
  });
67
68
  }
69
+ generateAuthToken(customerId) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ const urlWithPathParams = new PathParameters(CustomerPaths.generate, {
72
+ customer_id: customerId,
73
+ }).deriveUrl();
74
+ const response = yield this.client.post(urlWithPathParams, undefined);
75
+ const data = this.handleResponse(response);
76
+ return new AuthToken(data);
77
+ });
78
+ }
68
79
  }
@@ -7,8 +7,13 @@ export * from './prices/index.js';
7
7
  export * from './products/index.js';
8
8
  export * from './subscriptions/index.js';
9
9
  export * from './transactions/index.js';
10
+ export * from './payment-methods/index.js';
10
11
  export * from './pricing-preview/index.js';
11
12
  export * from './event-types/index.js';
12
13
  export * from './notification-settings/index.js';
13
14
  export * from './notifications/index.js';
14
15
  export * from './reports/index.js';
16
+ export * from './simulation-types/index.js';
17
+ export * from './simulations/index.js';
18
+ export * from './simulation-runs/index.js';
19
+ export * from './simulation-run-events/index.js';
@@ -0,0 +1,49 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { PaymentMethod, PaymentMethodCollection } from '../../entities/index.js';
11
+ import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js';
12
+ export * from './operations';
13
+ const PaymentMethodPaths = {
14
+ list: '/customers/{customer_id}/payment-methods',
15
+ get: '/customers/{customer_id}/payment-methods/{payment_method_id}',
16
+ delete: '/customers/{customer_id}/payment-methods/{payment_method_id}',
17
+ };
18
+ export class PaymentMethodsResource extends BaseResource {
19
+ list(customerId, queryParams) {
20
+ const queryParameters = new QueryParameters(queryParams);
21
+ const urlWithPathParams = new PathParameters(PaymentMethodPaths.list, {
22
+ customer_id: customerId,
23
+ }).deriveUrl();
24
+ return new PaymentMethodCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
25
+ }
26
+ get(customerId, paymentMethodId) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const urlWithPathParams = new PathParameters(PaymentMethodPaths.get, {
29
+ customer_id: customerId,
30
+ payment_method_id: paymentMethodId,
31
+ }).deriveUrl();
32
+ const response = yield this.client.get(urlWithPathParams);
33
+ const data = this.handleResponse(response);
34
+ return new PaymentMethod(data);
35
+ });
36
+ }
37
+ delete(customerId, paymentMethodId) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const urlWithPathParams = new PathParameters(PaymentMethodPaths.delete, {
40
+ customer_id: customerId,
41
+ payment_method_id: paymentMethodId,
42
+ }).deriveUrl();
43
+ const response = yield this.client.delete(urlWithPathParams);
44
+ if (response) {
45
+ this.handleResponse(response);
46
+ }
47
+ });
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ export * from './list-customer-payment-method-query-parameters.js';
@@ -0,0 +1,51 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { SimulationRunEvent, SimulationRunEventCollection } from '../../entities/index.js';
11
+ import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js';
12
+ export * from './operations/index.js';
13
+ const SimulationRunEventPaths = {
14
+ list: '/simulations/{simulation_id}/runs/{simulation_run_id}/events',
15
+ get: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}',
16
+ replay: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}/replay',
17
+ };
18
+ export class SimulationRunEventsResource extends BaseResource {
19
+ list(simulationId, simulationRunId, queryParams) {
20
+ const queryParameters = new QueryParameters(queryParams);
21
+ const urlWithPathParams = new PathParameters(SimulationRunEventPaths.list, {
22
+ simulation_id: simulationId,
23
+ simulation_run_id: simulationRunId,
24
+ }).deriveUrl();
25
+ return new SimulationRunEventCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
26
+ }
27
+ get(simulationId, simulationRunId, simulationEventId) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ const urlWithPathParams = new PathParameters(SimulationRunEventPaths.get, {
30
+ simulation_id: simulationId,
31
+ simulation_run_id: simulationRunId,
32
+ simulation_event_id: simulationEventId,
33
+ }).deriveUrl();
34
+ const response = yield this.client.get(urlWithPathParams);
35
+ const data = this.handleResponse(response);
36
+ return new SimulationRunEvent(data);
37
+ });
38
+ }
39
+ replay(simulationId, simulationRunId, simulationEventId) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const urlWithPathParams = new PathParameters(SimulationRunEventPaths.replay, {
42
+ simulation_id: simulationId,
43
+ simulation_run_id: simulationRunId,
44
+ simulation_event_id: simulationEventId,
45
+ }).deriveUrl();
46
+ const response = yield this.client.post(urlWithPathParams, undefined);
47
+ const data = this.handleResponse(response);
48
+ return new SimulationRunEvent(data);
49
+ });
50
+ }
51
+ }
@@ -0,0 +1 @@
1
+ export * from './list-simulation-run-events-query-parameters.js';
@@ -0,0 +1,48 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { SimulationRun, SimulationRunCollection } from '../../entities/index.js';
11
+ import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js';
12
+ export * from './operations/index.js';
13
+ const SimulationRunPaths = {
14
+ list: '/simulations/{simulation_id}/runs',
15
+ create: '/simulations/{simulation_id}/runs',
16
+ get: '/simulations/{simulation_id}/runs/{simulation_run_id}',
17
+ };
18
+ export class SimulationRunsResource extends BaseResource {
19
+ list(simulationId, queryParams) {
20
+ const queryParameters = new QueryParameters(queryParams);
21
+ const urlWithPathParams = new PathParameters(SimulationRunPaths.list, {
22
+ simulation_id: simulationId,
23
+ }).deriveUrl();
24
+ return new SimulationRunCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
25
+ }
26
+ create(simulationId) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const urlWithPathParams = new PathParameters(SimulationRunPaths.create, {
29
+ simulation_id: simulationId,
30
+ }).deriveUrl();
31
+ const response = yield this.client.post(urlWithPathParams, undefined);
32
+ const data = this.handleResponse(response);
33
+ return new SimulationRun(data);
34
+ });
35
+ }
36
+ get(simulationId, simulationRunId, queryParams) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const queryParameters = new QueryParameters(queryParams);
39
+ const urlWithPathParams = new PathParameters(SimulationRunPaths.get, {
40
+ simulation_id: simulationId,
41
+ simulation_run_id: simulationRunId,
42
+ }).deriveUrl();
43
+ const response = yield this.client.get(urlWithPathParams, queryParameters);
44
+ const data = this.handleResponse(response);
45
+ return new SimulationRun(data);
46
+ });
47
+ }
48
+ }
@@ -0,0 +1,2 @@
1
+ export * from './get-simulation-run-query-parameters.js';
2
+ export * from './list-simulation-run-query-parameters.js';
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BaseResource } from '../../internal/base/index.js';
11
+ import { SimulationType } from '../../entities/index.js';
12
+ const SimulationTypesPaths = {
13
+ list: '/simulation-types',
14
+ };
15
+ export class SimulationTypesResource extends BaseResource {
16
+ list() {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ const response = yield this.client.get(SimulationTypesPaths.list);
19
+ const data = this.handleResponse(response);
20
+ return data.map((simulationType) => new SimulationType(simulationType));
21
+ });
22
+ }
23
+ }
@@ -0,0 +1,51 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { Simulation, SimulationCollection } from '../../entities/index.js';
11
+ import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js';
12
+ export * from './operations/index.js';
13
+ const SimulationPaths = {
14
+ list: '/simulations',
15
+ create: '/simulations',
16
+ get: '/simulations/{simulation_id}',
17
+ update: '/simulations/{simulation_id}',
18
+ };
19
+ export class SimulationsResource extends BaseResource {
20
+ list(queryParams) {
21
+ const queryParameters = new QueryParameters(queryParams);
22
+ return new SimulationCollection(this.client, SimulationPaths.list + queryParameters.toQueryString());
23
+ }
24
+ create(createSimulationParameters) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const response = yield this.client.post(SimulationPaths.create, createSimulationParameters);
27
+ const data = this.handleResponse(response);
28
+ return new Simulation(data);
29
+ });
30
+ }
31
+ get(simulationId) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const urlWithPathParams = new PathParameters(SimulationPaths.get, {
34
+ simulation_id: simulationId,
35
+ }).deriveUrl();
36
+ const response = yield this.client.get(urlWithPathParams);
37
+ const data = this.handleResponse(response);
38
+ return new Simulation(data);
39
+ });
40
+ }
41
+ update(simulationId, updateSimulation) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const urlWithPathParams = new PathParameters(SimulationPaths.update, {
44
+ simulation_id: simulationId,
45
+ }).deriveUrl();
46
+ const response = yield this.client.patch(urlWithPathParams, updateSimulation);
47
+ const data = this.handleResponse(response);
48
+ return new Simulation(data);
49
+ });
50
+ }
51
+ }
@@ -0,0 +1,3 @@
1
+ export * from './create-simulation-request-body.js';
2
+ export * from './list-simulation-query-parameters.js';
3
+ export * from './update-simulation-request-body.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ export * from './auth-token-response.js';
1
2
  export * from './customer-response.js';
2
3
  export * from './credit-balance-response.js';
3
4
  export * from './customer-balance.js';
@@ -8,6 +8,7 @@ export * from './business/index.js';
8
8
  export * from './subscription/index.js';
9
9
  export * from './address/index.js';
10
10
  export * from './discount/index.js';
11
+ export * from './payment-method/index.js';
11
12
  export * from './pricing-preview/index.js';
12
13
  export * from './events/index.js';
13
14
  export * from './payout/index.js';
@@ -15,3 +16,7 @@ export * from './event-types/index.js';
15
16
  export * from './notification-settings/index.js';
16
17
  export * from './notifications/index.js';
17
18
  export * from './report/index.js';
19
+ export * from './simulation-type/index.js';
20
+ export * from './simulation/index.js';
21
+ export * from './simulation-run/index.js';
22
+ export * from './simulation-run-event/index.js';
@@ -0,0 +1 @@
1
+ export * from './payment-method.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -14,6 +14,7 @@ export * from './adjustment-original-amount-response.js';
14
14
  export * from './chargeback-fee.js';
15
15
  export * from './transaction-payout-totals-adjusted-response.js';
16
16
  export * from './unit-totals.js';
17
+ export * from './paypal.js';
17
18
  export * from './payment-card-response.js';
18
19
  export * from './payment-method-details.js';
19
20
  export * from './transaction-payment-attempt-response.js';
@@ -27,3 +28,6 @@ export * from './billing-details-create.js';
27
28
  export * from './billing-details-update.js';
28
29
  export * from './custom-data.js';
29
30
  export * from './import-meta-response.js';
31
+ export * from './simulation-event-request.js';
32
+ export * from './simulation-event-response.js';
33
+ export * from './simulation-payload.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './simulation-response.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './simulation-run-response.js';
@@ -0,0 +1 @@
1
+ export * from './simulation-run-event-response.js';
@@ -0,0 +1 @@
1
+ export * from './simulation-type.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- export const SDK_VERSION = '2.0.0-rc.0';
1
+ export const SDK_VERSION = '2.0.0-rc.2';
@@ -0,0 +1,6 @@
1
+ import { type IAuthTokenResponse } from '../../types/index.js';
2
+ export declare class AuthToken {
3
+ readonly customerAuthToken: string;
4
+ readonly expiresAt: string;
5
+ constructor(authToken: IAuthTokenResponse);
6
+ }
@@ -1,3 +1,4 @@
1
+ export * from './auth-token.js';
1
2
  export * from './customer-collection.js';
2
3
  export * from './customer.js';
3
4
  export * from './credit-balance.js';