@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,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentMethodNotification = void 0;
4
+ class PaymentMethodNotification {
5
+ constructor(paymentMethod) {
6
+ this.id = paymentMethod.id;
7
+ this.customerId = paymentMethod.customer_id;
8
+ this.addressId = paymentMethod.address_id;
9
+ this.type = paymentMethod.type;
10
+ this.origin = paymentMethod.origin;
11
+ this.savedAt = paymentMethod.saved_at;
12
+ this.updatedAt = paymentMethod.updated_at;
13
+ }
14
+ }
15
+ exports.PaymentMethodNotification = PaymentMethodNotification;
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./subscription-created-notification.js"), exports);
17
18
  __exportStar(require("./subscription-discount-notification.js"), exports);
18
19
  __exportStar(require("./subscription-time-period-notification.js"), exports);
19
20
  __exportStar(require("./subscription-scheduled-change-notification.js"), exports);
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionCreatedNotification = void 0;
4
+ const index_js_1 = require("../shared/index.js");
5
+ const subscription_discount_notification_js_1 = require("./subscription-discount-notification.js");
6
+ const subscription_item_notification_js_1 = require("./subscription-item-notification.js");
7
+ const subscription_scheduled_change_notification_js_1 = require("./subscription-scheduled-change-notification.js");
8
+ const subscription_time_period_notification_js_1 = require("./subscription-time-period-notification.js");
9
+ class SubscriptionCreatedNotification {
10
+ constructor(subscription) {
11
+ this.id = subscription.id;
12
+ this.status = subscription.status;
13
+ this.transactionId = subscription.transaction_id;
14
+ this.customerId = subscription.customer_id;
15
+ this.addressId = subscription.address_id;
16
+ this.businessId = subscription.business_id ? subscription.business_id : null;
17
+ this.currencyCode = subscription.currency_code;
18
+ this.createdAt = subscription.created_at;
19
+ this.updatedAt = subscription.updated_at;
20
+ this.startedAt = subscription.started_at ? subscription.started_at : null;
21
+ this.firstBilledAt = subscription.first_billed_at ? subscription.first_billed_at : null;
22
+ this.nextBilledAt = subscription.next_billed_at ? subscription.next_billed_at : null;
23
+ this.pausedAt = subscription.paused_at ? subscription.paused_at : null;
24
+ this.canceledAt = subscription.canceled_at ? subscription.canceled_at : null;
25
+ this.discount = subscription.discount ? new subscription_discount_notification_js_1.SubscriptionDiscountNotification(subscription.discount) : null;
26
+ this.collectionMode = subscription.collection_mode;
27
+ this.billingDetails = subscription.billing_details
28
+ ? new index_js_1.BillingDetailsNotification(subscription.billing_details)
29
+ : null;
30
+ this.currentBillingPeriod = subscription.current_billing_period
31
+ ? new subscription_time_period_notification_js_1.SubscriptionTimePeriodNotification(subscription.current_billing_period)
32
+ : null;
33
+ this.billingCycle = new index_js_1.TimePeriodNotification(subscription.billing_cycle);
34
+ this.scheduledChange = subscription.scheduled_change
35
+ ? new subscription_scheduled_change_notification_js_1.SubscriptionScheduledChangeNotification(subscription.scheduled_change)
36
+ : null;
37
+ this.items = subscription.items.map((item) => new subscription_item_notification_js_1.SubscriptionItemNotification(item));
38
+ this.customData = subscription.custom_data ? subscription.custom_data : null;
39
+ this.importMeta = subscription.import_meta ? new index_js_1.ImportMetaNotification(subscription.import_meta) : null;
40
+ }
41
+ }
42
+ exports.SubscriptionCreatedNotification = SubscriptionCreatedNotification;
@@ -10,7 +10,6 @@ class SubscriptionNotification {
10
10
  constructor(subscription) {
11
11
  this.id = subscription.id;
12
12
  this.status = subscription.status;
13
- this.transactionId = subscription.transaction_id ? subscription.transaction_id : null;
14
13
  this.customerId = subscription.customer_id;
15
14
  this.addressId = subscription.address_id;
16
15
  this.businessId = subscription.business_id ? subscription.business_id : null;
@@ -19,6 +19,7 @@ __exportStar(require("./adjustment/index.js"), exports);
19
19
  __exportStar(require("./business/index.js"), exports);
20
20
  __exportStar(require("./customer/index.js"), exports);
21
21
  __exportStar(require("./discount/index.js"), exports);
22
+ __exportStar(require("./payment-method/index.js"), exports);
22
23
  __exportStar(require("./payout/index.js"), exports);
23
24
  __exportStar(require("./price/index.js"), exports);
24
25
  __exportStar(require("./product/index.js"), exports);
@@ -0,0 +1,18 @@
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("./payment-method-deleted-event.js"), exports);
18
+ __exportStar(require("./payment-method-saved-event.js"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentMethodDeletedEvent = void 0;
4
+ const event_js_1 = require("../../../entities/events/event.js");
5
+ const index_js_1 = require("../../entities/index.js");
6
+ const index_js_2 = require("../../helpers/index.js");
7
+ class PaymentMethodDeletedEvent extends event_js_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = index_js_2.EventName.PaymentMethodDeleted;
11
+ this.data = new index_js_1.PaymentMethodDeletedNotification(response.data);
12
+ }
13
+ }
14
+ exports.PaymentMethodDeletedEvent = PaymentMethodDeletedEvent;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentMethodSavedEvent = void 0;
4
+ const event_js_1 = require("../../../entities/events/event.js");
5
+ const index_js_1 = require("../../entities/index.js");
6
+ const index_js_2 = require("../../helpers/index.js");
7
+ class PaymentMethodSavedEvent extends event_js_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = index_js_2.EventName.PaymentMethodSaved;
11
+ this.data = new index_js_1.PaymentMethodNotification(response.data);
12
+ }
13
+ }
14
+ exports.PaymentMethodSavedEvent = PaymentMethodSavedEvent;
@@ -8,7 +8,7 @@ class SubscriptionCreatedEvent extends event_js_1.Event {
8
8
  constructor(response) {
9
9
  super(response);
10
10
  this.eventType = index_js_1.EventName.SubscriptionCreated;
11
- this.data = new index_js_2.SubscriptionNotification(response.data);
11
+ this.data = new index_js_2.SubscriptionCreatedNotification(response.data);
12
12
  }
13
13
  }
14
14
  exports.SubscriptionCreatedEvent = SubscriptionCreatedEvent;
@@ -17,6 +17,8 @@ var EventName;
17
17
  EventName["DiscountCreated"] = "discount.created";
18
18
  EventName["DiscountUpdated"] = "discount.updated";
19
19
  EventName["DiscountImported"] = "discount.imported";
20
+ EventName["PaymentMethodDeleted"] = "payment_method.deleted";
21
+ EventName["PaymentMethodSaved"] = "payment_method.saved";
20
22
  EventName["PayoutCreated"] = "payout.created";
21
23
  EventName["PayoutPaid"] = "payout.paid";
22
24
  EventName["PriceCreated"] = "price.created";
@@ -62,6 +62,10 @@ class Webhooks {
62
62
  return new index_js_1.DiscountImportedEvent(data);
63
63
  case types_js_1.EventName.DiscountUpdated:
64
64
  return new index_js_1.DiscountUpdatedEvent(data);
65
+ case types_js_1.EventName.PaymentMethodDeleted:
66
+ return new index_js_1.PaymentMethodDeletedEvent(data);
67
+ case types_js_1.EventName.PaymentMethodSaved:
68
+ return new index_js_1.PaymentMethodSavedEvent(data);
65
69
  case types_js_1.EventName.PayoutCreated:
66
70
  return new index_js_1.PayoutCreatedEvent(data);
67
71
  case types_js_1.EventName.PayoutPaid:
@@ -23,6 +23,7 @@ __exportStar(require("./business/index.js"), exports);
23
23
  __exportStar(require("./subscription/index.js"), exports);
24
24
  __exportStar(require("./address/index.js"), exports);
25
25
  __exportStar(require("./discount/index.js"), exports);
26
+ __exportStar(require("./payment-method/index.js"), exports);
26
27
  __exportStar(require("./payout/index.js"), exports);
27
28
  __exportStar(require("./report/index.js"), exports);
28
29
  __exportStar(require("./shared/index.js"), exports);
@@ -0,0 +1,18 @@
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("./payment-method-deleted-notification-response.js"), exports);
18
+ __exportStar(require("./payment-method-notification-response.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./subscription-created-notification-response.js"), exports);
17
18
  __exportStar(require("./subscription-discount-notification-response.js"), exports);
18
19
  __exportStar(require("./subscription-time-period-notification-response.js"), exports);
19
20
  __exportStar(require("./subscription-scheduled-change-notification-response.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -22,6 +22,7 @@ class Paddle {
22
22
  this.businesses = new index_js_2.BusinessesResource(this.client);
23
23
  this.discounts = new index_js_2.DiscountsResource(this.client);
24
24
  this.subscriptions = new index_js_2.SubscriptionsResource(this.client);
25
+ this.paymentMethods = new index_js_2.PaymentMethodsResource(this.client);
25
26
  this.pricingPreview = new index_js_2.PricingPreviewResource(this.client);
26
27
  this.events = new index_js_3.EventsResource(this.client);
27
28
  this.webhooks = new index_js_4.Webhooks();
@@ -29,6 +30,10 @@ class Paddle {
29
30
  this.notificationSettings = new index_js_2.NotificationSettingsResource(this.client);
30
31
  this.notifications = new index_js_2.NotificationsResource(this.client);
31
32
  this.reports = new index_js_2.ReportsResource(this.client);
33
+ this.simulationTypes = new index_js_2.SimulationTypesResource(this.client);
34
+ this.simulations = new index_js_2.SimulationsResource(this.client);
35
+ this.simulationRuns = new index_js_2.SimulationRunsResource(this.client);
36
+ this.simulationRunEvents = new index_js_2.SimulationRunEventsResource(this.client);
32
37
  }
33
38
  }
34
39
  exports.Paddle = Paddle;
@@ -32,6 +32,7 @@ const CustomerPaths = {
32
32
  get: '/customers/{customer_id}',
33
33
  update: '/customers/{customer_id}',
34
34
  getCustomerBalance: '/customers/{customer_id}/credit-balances',
35
+ generate: '/customers/{customer_id}/auth-token',
35
36
  };
36
37
  __exportStar(require("./operations/index.js"), exports);
37
38
  class CustomersResource extends index_js_1.BaseResource {
@@ -82,5 +83,15 @@ class CustomersResource extends index_js_1.BaseResource {
82
83
  return yield this.update(customerId, { status: 'archived' });
83
84
  });
84
85
  }
86
+ generateAuthToken(customerId) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const urlWithPathParams = new index_js_1.PathParameters(CustomerPaths.generate, {
89
+ customer_id: customerId,
90
+ }).deriveUrl();
91
+ const response = yield this.client.post(urlWithPathParams, undefined);
92
+ const data = this.handleResponse(response);
93
+ return new index_js_2.AuthToken(data);
94
+ });
95
+ }
85
96
  }
86
97
  exports.CustomersResource = CustomersResource;
@@ -23,8 +23,13 @@ __exportStar(require("./prices/index.js"), exports);
23
23
  __exportStar(require("./products/index.js"), exports);
24
24
  __exportStar(require("./subscriptions/index.js"), exports);
25
25
  __exportStar(require("./transactions/index.js"), exports);
26
+ __exportStar(require("./payment-methods/index.js"), exports);
26
27
  __exportStar(require("./pricing-preview/index.js"), exports);
27
28
  __exportStar(require("./event-types/index.js"), exports);
28
29
  __exportStar(require("./notification-settings/index.js"), exports);
29
30
  __exportStar(require("./notifications/index.js"), exports);
30
31
  __exportStar(require("./reports/index.js"), exports);
32
+ __exportStar(require("./simulation-types/index.js"), exports);
33
+ __exportStar(require("./simulations/index.js"), exports);
34
+ __exportStar(require("./simulation-runs/index.js"), exports);
35
+ __exportStar(require("./simulation-run-events/index.js"), exports);
@@ -0,0 +1,67 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PaymentMethodsResource = void 0;
27
+ const index_js_1 = require("../../entities/index.js");
28
+ const index_js_2 = require("../../internal/base/index.js");
29
+ __exportStar(require("./operations"), exports);
30
+ const PaymentMethodPaths = {
31
+ list: '/customers/{customer_id}/payment-methods',
32
+ get: '/customers/{customer_id}/payment-methods/{payment_method_id}',
33
+ delete: '/customers/{customer_id}/payment-methods/{payment_method_id}',
34
+ };
35
+ class PaymentMethodsResource extends index_js_2.BaseResource {
36
+ list(customerId, queryParams) {
37
+ const queryParameters = new index_js_2.QueryParameters(queryParams);
38
+ const urlWithPathParams = new index_js_2.PathParameters(PaymentMethodPaths.list, {
39
+ customer_id: customerId,
40
+ }).deriveUrl();
41
+ return new index_js_1.PaymentMethodCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
42
+ }
43
+ get(customerId, paymentMethodId) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const urlWithPathParams = new index_js_2.PathParameters(PaymentMethodPaths.get, {
46
+ customer_id: customerId,
47
+ payment_method_id: paymentMethodId,
48
+ }).deriveUrl();
49
+ const response = yield this.client.get(urlWithPathParams);
50
+ const data = this.handleResponse(response);
51
+ return new index_js_1.PaymentMethod(data);
52
+ });
53
+ }
54
+ delete(customerId, paymentMethodId) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const urlWithPathParams = new index_js_2.PathParameters(PaymentMethodPaths.delete, {
57
+ customer_id: customerId,
58
+ payment_method_id: paymentMethodId,
59
+ }).deriveUrl();
60
+ const response = yield this.client.delete(urlWithPathParams);
61
+ if (response) {
62
+ this.handleResponse(response);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ exports.PaymentMethodsResource = PaymentMethodsResource;
@@ -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("./list-customer-payment-method-query-parameters.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,69 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SimulationRunEventsResource = void 0;
27
+ const index_js_1 = require("../../entities/index.js");
28
+ const index_js_2 = require("../../internal/base/index.js");
29
+ __exportStar(require("./operations/index.js"), exports);
30
+ const SimulationRunEventPaths = {
31
+ list: '/simulations/{simulation_id}/runs/{simulation_run_id}/events',
32
+ get: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}',
33
+ replay: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}/replay',
34
+ };
35
+ class SimulationRunEventsResource extends index_js_2.BaseResource {
36
+ list(simulationId, simulationRunId, queryParams) {
37
+ const queryParameters = new index_js_2.QueryParameters(queryParams);
38
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.list, {
39
+ simulation_id: simulationId,
40
+ simulation_run_id: simulationRunId,
41
+ }).deriveUrl();
42
+ return new index_js_1.SimulationRunEventCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
43
+ }
44
+ get(simulationId, simulationRunId, simulationEventId) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.get, {
47
+ simulation_id: simulationId,
48
+ simulation_run_id: simulationRunId,
49
+ simulation_event_id: simulationEventId,
50
+ }).deriveUrl();
51
+ const response = yield this.client.get(urlWithPathParams);
52
+ const data = this.handleResponse(response);
53
+ return new index_js_1.SimulationRunEvent(data);
54
+ });
55
+ }
56
+ replay(simulationId, simulationRunId, simulationEventId) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.replay, {
59
+ simulation_id: simulationId,
60
+ simulation_run_id: simulationRunId,
61
+ simulation_event_id: simulationEventId,
62
+ }).deriveUrl();
63
+ const response = yield this.client.post(urlWithPathParams, undefined);
64
+ const data = this.handleResponse(response);
65
+ return new index_js_1.SimulationRunEvent(data);
66
+ });
67
+ }
68
+ }
69
+ exports.SimulationRunEventsResource = SimulationRunEventsResource;
@@ -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("./list-simulation-run-events-query-parameters.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,66 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SimulationRunsResource = void 0;
27
+ const index_js_1 = require("../../entities/index.js");
28
+ const index_js_2 = require("../../internal/base/index.js");
29
+ __exportStar(require("./operations/index.js"), exports);
30
+ const SimulationRunPaths = {
31
+ list: '/simulations/{simulation_id}/runs',
32
+ create: '/simulations/{simulation_id}/runs',
33
+ get: '/simulations/{simulation_id}/runs/{simulation_run_id}',
34
+ };
35
+ class SimulationRunsResource extends index_js_2.BaseResource {
36
+ list(simulationId, queryParams) {
37
+ const queryParameters = new index_js_2.QueryParameters(queryParams);
38
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.list, {
39
+ simulation_id: simulationId,
40
+ }).deriveUrl();
41
+ return new index_js_1.SimulationRunCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
42
+ }
43
+ create(simulationId) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.create, {
46
+ simulation_id: simulationId,
47
+ }).deriveUrl();
48
+ const response = yield this.client.post(urlWithPathParams, undefined);
49
+ const data = this.handleResponse(response);
50
+ return new index_js_1.SimulationRun(data);
51
+ });
52
+ }
53
+ get(simulationId, simulationRunId, queryParams) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const queryParameters = new index_js_2.QueryParameters(queryParams);
56
+ const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.get, {
57
+ simulation_id: simulationId,
58
+ simulation_run_id: simulationRunId,
59
+ }).deriveUrl();
60
+ const response = yield this.client.get(urlWithPathParams, queryParameters);
61
+ const data = this.handleResponse(response);
62
+ return new index_js_1.SimulationRun(data);
63
+ });
64
+ }
65
+ }
66
+ exports.SimulationRunsResource = SimulationRunsResource;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
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("./get-simulation-run-query-parameters.js"), exports);
18
+ __exportStar(require("./list-simulation-run-query-parameters.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SimulationTypesResource = void 0;
13
+ const index_js_1 = require("../../internal/base/index.js");
14
+ const index_js_2 = require("../../entities/index.js");
15
+ const SimulationTypesPaths = {
16
+ list: '/simulation-types',
17
+ };
18
+ class SimulationTypesResource extends index_js_1.BaseResource {
19
+ list() {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const response = yield this.client.get(SimulationTypesPaths.list);
22
+ const data = this.handleResponse(response);
23
+ return data.map((simulationType) => new index_js_2.SimulationType(simulationType));
24
+ });
25
+ }
26
+ }
27
+ exports.SimulationTypesResource = SimulationTypesResource;