@justonemonkey/n8n-nodes-polar-sh 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +112 -0
  3. package/dist/credentials/PolarApi.credentials.d.ts +10 -0
  4. package/dist/credentials/PolarApi.credentials.js +50 -0
  5. package/dist/credentials/PolarApi.credentials.js.map +1 -0
  6. package/dist/icons/polar.dark.svg +10 -0
  7. package/dist/icons/polar.svg +10 -0
  8. package/dist/nodes/Polar/Polar.node.d.ts +20 -0
  9. package/dist/nodes/Polar/Polar.node.js +140 -0
  10. package/dist/nodes/Polar/Polar.node.js.map +1 -0
  11. package/dist/nodes/Polar/Polar.node.json +14 -0
  12. package/dist/nodes/Polar/listSearch/getBenefits.d.ts +2 -0
  13. package/dist/nodes/Polar/listSearch/getBenefits.js +19 -0
  14. package/dist/nodes/Polar/listSearch/getBenefits.js.map +1 -0
  15. package/dist/nodes/Polar/listSearch/getCustomers.d.ts +2 -0
  16. package/dist/nodes/Polar/listSearch/getCustomers.js +19 -0
  17. package/dist/nodes/Polar/listSearch/getCustomers.js.map +1 -0
  18. package/dist/nodes/Polar/listSearch/getProducts.d.ts +2 -0
  19. package/dist/nodes/Polar/listSearch/getProducts.js +19 -0
  20. package/dist/nodes/Polar/listSearch/getProducts.js.map +1 -0
  21. package/dist/nodes/Polar/loadOptions/getBenefitOptions.d.ts +2 -0
  22. package/dist/nodes/Polar/loadOptions/getBenefitOptions.js +11 -0
  23. package/dist/nodes/Polar/loadOptions/getBenefitOptions.js.map +1 -0
  24. package/dist/nodes/Polar/loadOptions/getProductOptions.d.ts +2 -0
  25. package/dist/nodes/Polar/loadOptions/getProductOptions.js +12 -0
  26. package/dist/nodes/Polar/loadOptions/getProductOptions.js.map +1 -0
  27. package/dist/nodes/Polar/resources/benefit/create.d.ts +2 -0
  28. package/dist/nodes/Polar/resources/benefit/create.js +347 -0
  29. package/dist/nodes/Polar/resources/benefit/create.js.map +1 -0
  30. package/dist/nodes/Polar/resources/benefit/delete.d.ts +2 -0
  31. package/dist/nodes/Polar/resources/benefit/delete.js +15 -0
  32. package/dist/nodes/Polar/resources/benefit/delete.js.map +1 -0
  33. package/dist/nodes/Polar/resources/benefit/get.d.ts +2 -0
  34. package/dist/nodes/Polar/resources/benefit/get.js +15 -0
  35. package/dist/nodes/Polar/resources/benefit/get.js.map +1 -0
  36. package/dist/nodes/Polar/resources/benefit/getAll.d.ts +2 -0
  37. package/dist/nodes/Polar/resources/benefit/getAll.js +44 -0
  38. package/dist/nodes/Polar/resources/benefit/getAll.js.map +1 -0
  39. package/dist/nodes/Polar/resources/benefit/getGrants.d.ts +2 -0
  40. package/dist/nodes/Polar/resources/benefit/getGrants.js +49 -0
  41. package/dist/nodes/Polar/resources/benefit/getGrants.js.map +1 -0
  42. package/dist/nodes/Polar/resources/benefit/index.d.ts +2 -0
  43. package/dist/nodes/Polar/resources/benefit/index.js +71 -0
  44. package/dist/nodes/Polar/resources/benefit/index.js.map +1 -0
  45. package/dist/nodes/Polar/resources/benefit/update.d.ts +2 -0
  46. package/dist/nodes/Polar/resources/benefit/update.js +321 -0
  47. package/dist/nodes/Polar/resources/benefit/update.js.map +1 -0
  48. package/dist/nodes/Polar/resources/benefitGrant/getAll.d.ts +2 -0
  49. package/dist/nodes/Polar/resources/benefitGrant/getAll.js +41 -0
  50. package/dist/nodes/Polar/resources/benefitGrant/getAll.js.map +1 -0
  51. package/dist/nodes/Polar/resources/benefitGrant/index.d.ts +2 -0
  52. package/dist/nodes/Polar/resources/benefitGrant/index.js +26 -0
  53. package/dist/nodes/Polar/resources/benefitGrant/index.js.map +1 -0
  54. package/dist/nodes/Polar/resources/checkout/create.d.ts +2 -0
  55. package/dist/nodes/Polar/resources/checkout/create.js +211 -0
  56. package/dist/nodes/Polar/resources/checkout/create.js.map +1 -0
  57. package/dist/nodes/Polar/resources/checkout/get.d.ts +2 -0
  58. package/dist/nodes/Polar/resources/checkout/get.js +16 -0
  59. package/dist/nodes/Polar/resources/checkout/get.js.map +1 -0
  60. package/dist/nodes/Polar/resources/checkout/getAll.d.ts +2 -0
  61. package/dist/nodes/Polar/resources/checkout/getAll.js +62 -0
  62. package/dist/nodes/Polar/resources/checkout/getAll.js.map +1 -0
  63. package/dist/nodes/Polar/resources/checkout/index.d.ts +2 -0
  64. package/dist/nodes/Polar/resources/checkout/index.js +53 -0
  65. package/dist/nodes/Polar/resources/checkout/index.js.map +1 -0
  66. package/dist/nodes/Polar/resources/checkout/update.d.ts +2 -0
  67. package/dist/nodes/Polar/resources/checkout/update.js +185 -0
  68. package/dist/nodes/Polar/resources/checkout/update.js.map +1 -0
  69. package/dist/nodes/Polar/resources/checkoutLink/create.d.ts +2 -0
  70. package/dist/nodes/Polar/resources/checkoutLink/create.js +139 -0
  71. package/dist/nodes/Polar/resources/checkoutLink/create.js.map +1 -0
  72. package/dist/nodes/Polar/resources/checkoutLink/delete.d.ts +2 -0
  73. package/dist/nodes/Polar/resources/checkoutLink/delete.js +15 -0
  74. package/dist/nodes/Polar/resources/checkoutLink/delete.js.map +1 -0
  75. package/dist/nodes/Polar/resources/checkoutLink/get.d.ts +2 -0
  76. package/dist/nodes/Polar/resources/checkoutLink/get.js +15 -0
  77. package/dist/nodes/Polar/resources/checkoutLink/get.js.map +1 -0
  78. package/dist/nodes/Polar/resources/checkoutLink/getAll.d.ts +2 -0
  79. package/dist/nodes/Polar/resources/checkoutLink/getAll.js +33 -0
  80. package/dist/nodes/Polar/resources/checkoutLink/getAll.js.map +1 -0
  81. package/dist/nodes/Polar/resources/checkoutLink/index.d.ts +2 -0
  82. package/dist/nodes/Polar/resources/checkoutLink/index.js +62 -0
  83. package/dist/nodes/Polar/resources/checkoutLink/index.js.map +1 -0
  84. package/dist/nodes/Polar/resources/checkoutLink/update.d.ts +2 -0
  85. package/dist/nodes/Polar/resources/checkoutLink/update.js +112 -0
  86. package/dist/nodes/Polar/resources/checkoutLink/update.js.map +1 -0
  87. package/dist/nodes/Polar/resources/customField/create.d.ts +2 -0
  88. package/dist/nodes/Polar/resources/customField/create.js +160 -0
  89. package/dist/nodes/Polar/resources/customField/create.js.map +1 -0
  90. package/dist/nodes/Polar/resources/customField/delete.d.ts +2 -0
  91. package/dist/nodes/Polar/resources/customField/delete.js +15 -0
  92. package/dist/nodes/Polar/resources/customField/delete.js.map +1 -0
  93. package/dist/nodes/Polar/resources/customField/get.d.ts +2 -0
  94. package/dist/nodes/Polar/resources/customField/get.js +15 -0
  95. package/dist/nodes/Polar/resources/customField/get.js.map +1 -0
  96. package/dist/nodes/Polar/resources/customField/getAll.d.ts +2 -0
  97. package/dist/nodes/Polar/resources/customField/getAll.js +42 -0
  98. package/dist/nodes/Polar/resources/customField/getAll.js.map +1 -0
  99. package/dist/nodes/Polar/resources/customField/index.d.ts +2 -0
  100. package/dist/nodes/Polar/resources/customField/index.js +62 -0
  101. package/dist/nodes/Polar/resources/customField/index.js.map +1 -0
  102. package/dist/nodes/Polar/resources/customField/update.d.ts +2 -0
  103. package/dist/nodes/Polar/resources/customField/update.js +182 -0
  104. package/dist/nodes/Polar/resources/customField/update.js.map +1 -0
  105. package/dist/nodes/Polar/resources/customer/create.d.ts +2 -0
  106. package/dist/nodes/Polar/resources/customer/create.js +127 -0
  107. package/dist/nodes/Polar/resources/customer/create.js.map +1 -0
  108. package/dist/nodes/Polar/resources/customer/delete.d.ts +2 -0
  109. package/dist/nodes/Polar/resources/customer/delete.js +33 -0
  110. package/dist/nodes/Polar/resources/customer/delete.js.map +1 -0
  111. package/dist/nodes/Polar/resources/customer/get.d.ts +2 -0
  112. package/dist/nodes/Polar/resources/customer/get.js +25 -0
  113. package/dist/nodes/Polar/resources/customer/get.js.map +1 -0
  114. package/dist/nodes/Polar/resources/customer/getAll.d.ts +2 -0
  115. package/dist/nodes/Polar/resources/customer/getAll.js +43 -0
  116. package/dist/nodes/Polar/resources/customer/getAll.js.map +1 -0
  117. package/dist/nodes/Polar/resources/customer/getPaymentMethods.d.ts +2 -0
  118. package/dist/nodes/Polar/resources/customer/getPaymentMethods.js +17 -0
  119. package/dist/nodes/Polar/resources/customer/getPaymentMethods.js.map +1 -0
  120. package/dist/nodes/Polar/resources/customer/getState.d.ts +2 -0
  121. package/dist/nodes/Polar/resources/customer/getState.js +25 -0
  122. package/dist/nodes/Polar/resources/customer/getState.js.map +1 -0
  123. package/dist/nodes/Polar/resources/customer/index.d.ts +2 -0
  124. package/dist/nodes/Polar/resources/customer/index.js +108 -0
  125. package/dist/nodes/Polar/resources/customer/index.js.map +1 -0
  126. package/dist/nodes/Polar/resources/customer/update.d.ts +2 -0
  127. package/dist/nodes/Polar/resources/customer/update.js +85 -0
  128. package/dist/nodes/Polar/resources/customer/update.js.map +1 -0
  129. package/dist/nodes/Polar/resources/customerMeter/get.d.ts +2 -0
  130. package/dist/nodes/Polar/resources/customerMeter/get.js +15 -0
  131. package/dist/nodes/Polar/resources/customerMeter/get.js.map +1 -0
  132. package/dist/nodes/Polar/resources/customerMeter/getAll.d.ts +2 -0
  133. package/dist/nodes/Polar/resources/customerMeter/getAll.js +40 -0
  134. package/dist/nodes/Polar/resources/customerMeter/getAll.js.map +1 -0
  135. package/dist/nodes/Polar/resources/customerMeter/index.d.ts +2 -0
  136. package/dist/nodes/Polar/resources/customerMeter/index.js +35 -0
  137. package/dist/nodes/Polar/resources/customerMeter/index.js.map +1 -0
  138. package/dist/nodes/Polar/resources/customerSeat/assign.d.ts +2 -0
  139. package/dist/nodes/Polar/resources/customerSeat/assign.js +90 -0
  140. package/dist/nodes/Polar/resources/customerSeat/assign.js.map +1 -0
  141. package/dist/nodes/Polar/resources/customerSeat/claim.d.ts +2 -0
  142. package/dist/nodes/Polar/resources/customerSeat/claim.js +18 -0
  143. package/dist/nodes/Polar/resources/customerSeat/claim.js.map +1 -0
  144. package/dist/nodes/Polar/resources/customerSeat/getAll.d.ts +2 -0
  145. package/dist/nodes/Polar/resources/customerSeat/getAll.js +34 -0
  146. package/dist/nodes/Polar/resources/customerSeat/getAll.js.map +1 -0
  147. package/dist/nodes/Polar/resources/customerSeat/getClaimInfo.d.ts +2 -0
  148. package/dist/nodes/Polar/resources/customerSeat/getClaimInfo.js +17 -0
  149. package/dist/nodes/Polar/resources/customerSeat/getClaimInfo.js.map +1 -0
  150. package/dist/nodes/Polar/resources/customerSeat/index.d.ts +2 -0
  151. package/dist/nodes/Polar/resources/customerSeat/index.js +71 -0
  152. package/dist/nodes/Polar/resources/customerSeat/index.js.map +1 -0
  153. package/dist/nodes/Polar/resources/customerSeat/resendInvitation.d.ts +2 -0
  154. package/dist/nodes/Polar/resources/customerSeat/resendInvitation.js +15 -0
  155. package/dist/nodes/Polar/resources/customerSeat/resendInvitation.js.map +1 -0
  156. package/dist/nodes/Polar/resources/customerSeat/revoke.d.ts +2 -0
  157. package/dist/nodes/Polar/resources/customerSeat/revoke.js +15 -0
  158. package/dist/nodes/Polar/resources/customerSeat/revoke.js.map +1 -0
  159. package/dist/nodes/Polar/resources/customerSession/create.d.ts +2 -0
  160. package/dist/nodes/Polar/resources/customerSession/create.js +52 -0
  161. package/dist/nodes/Polar/resources/customerSession/create.js.map +1 -0
  162. package/dist/nodes/Polar/resources/customerSession/index.d.ts +2 -0
  163. package/dist/nodes/Polar/resources/customerSession/index.js +26 -0
  164. package/dist/nodes/Polar/resources/customerSession/index.js.map +1 -0
  165. package/dist/nodes/Polar/resources/discount/create.d.ts +2 -0
  166. package/dist/nodes/Polar/resources/discount/create.js +136 -0
  167. package/dist/nodes/Polar/resources/discount/create.js.map +1 -0
  168. package/dist/nodes/Polar/resources/discount/delete.d.ts +2 -0
  169. package/dist/nodes/Polar/resources/discount/delete.js +15 -0
  170. package/dist/nodes/Polar/resources/discount/delete.js.map +1 -0
  171. package/dist/nodes/Polar/resources/discount/get.d.ts +2 -0
  172. package/dist/nodes/Polar/resources/discount/get.js +15 -0
  173. package/dist/nodes/Polar/resources/discount/get.js.map +1 -0
  174. package/dist/nodes/Polar/resources/discount/getAll.d.ts +2 -0
  175. package/dist/nodes/Polar/resources/discount/getAll.js +18 -0
  176. package/dist/nodes/Polar/resources/discount/getAll.js.map +1 -0
  177. package/dist/nodes/Polar/resources/discount/index.d.ts +2 -0
  178. package/dist/nodes/Polar/resources/discount/index.js +62 -0
  179. package/dist/nodes/Polar/resources/discount/index.js.map +1 -0
  180. package/dist/nodes/Polar/resources/discount/update.d.ts +2 -0
  181. package/dist/nodes/Polar/resources/discount/update.js +124 -0
  182. package/dist/nodes/Polar/resources/discount/update.js.map +1 -0
  183. package/dist/nodes/Polar/resources/dispute/get.d.ts +2 -0
  184. package/dist/nodes/Polar/resources/dispute/get.js +15 -0
  185. package/dist/nodes/Polar/resources/dispute/get.js.map +1 -0
  186. package/dist/nodes/Polar/resources/dispute/getAll.d.ts +2 -0
  187. package/dist/nodes/Polar/resources/dispute/getAll.js +43 -0
  188. package/dist/nodes/Polar/resources/dispute/getAll.js.map +1 -0
  189. package/dist/nodes/Polar/resources/dispute/index.d.ts +2 -0
  190. package/dist/nodes/Polar/resources/dispute/index.js +35 -0
  191. package/dist/nodes/Polar/resources/dispute/index.js.map +1 -0
  192. package/dist/nodes/Polar/resources/event/get.d.ts +2 -0
  193. package/dist/nodes/Polar/resources/event/get.js +15 -0
  194. package/dist/nodes/Polar/resources/event/get.js.map +1 -0
  195. package/dist/nodes/Polar/resources/event/getAll.d.ts +2 -0
  196. package/dist/nodes/Polar/resources/event/getAll.js +98 -0
  197. package/dist/nodes/Polar/resources/event/getAll.js.map +1 -0
  198. package/dist/nodes/Polar/resources/event/index.d.ts +2 -0
  199. package/dist/nodes/Polar/resources/event/index.js +53 -0
  200. package/dist/nodes/Polar/resources/event/index.js.map +1 -0
  201. package/dist/nodes/Polar/resources/event/ingest.d.ts +2 -0
  202. package/dist/nodes/Polar/resources/event/ingest.js +112 -0
  203. package/dist/nodes/Polar/resources/event/ingest.js.map +1 -0
  204. package/dist/nodes/Polar/resources/event/listNames.d.ts +2 -0
  205. package/dist/nodes/Polar/resources/event/listNames.js +52 -0
  206. package/dist/nodes/Polar/resources/event/listNames.js.map +1 -0
  207. package/dist/nodes/Polar/resources/eventType/getAll.d.ts +2 -0
  208. package/dist/nodes/Polar/resources/eventType/getAll.js +68 -0
  209. package/dist/nodes/Polar/resources/eventType/getAll.js.map +1 -0
  210. package/dist/nodes/Polar/resources/eventType/index.d.ts +2 -0
  211. package/dist/nodes/Polar/resources/eventType/index.js +35 -0
  212. package/dist/nodes/Polar/resources/eventType/index.js.map +1 -0
  213. package/dist/nodes/Polar/resources/eventType/update.d.ts +2 -0
  214. package/dist/nodes/Polar/resources/eventType/update.js +34 -0
  215. package/dist/nodes/Polar/resources/eventType/update.js.map +1 -0
  216. package/dist/nodes/Polar/resources/file/completeUpload.d.ts +2 -0
  217. package/dist/nodes/Polar/resources/file/completeUpload.js +72 -0
  218. package/dist/nodes/Polar/resources/file/completeUpload.js.map +1 -0
  219. package/dist/nodes/Polar/resources/file/create.d.ts +2 -0
  220. package/dist/nodes/Polar/resources/file/create.js +118 -0
  221. package/dist/nodes/Polar/resources/file/create.js.map +1 -0
  222. package/dist/nodes/Polar/resources/file/delete.d.ts +2 -0
  223. package/dist/nodes/Polar/resources/file/delete.js +15 -0
  224. package/dist/nodes/Polar/resources/file/delete.js.map +1 -0
  225. package/dist/nodes/Polar/resources/file/getAll.d.ts +2 -0
  226. package/dist/nodes/Polar/resources/file/getAll.js +34 -0
  227. package/dist/nodes/Polar/resources/file/getAll.js.map +1 -0
  228. package/dist/nodes/Polar/resources/file/index.d.ts +2 -0
  229. package/dist/nodes/Polar/resources/file/index.js +62 -0
  230. package/dist/nodes/Polar/resources/file/index.js.map +1 -0
  231. package/dist/nodes/Polar/resources/file/update.d.ts +2 -0
  232. package/dist/nodes/Polar/resources/file/update.js +39 -0
  233. package/dist/nodes/Polar/resources/file/update.js.map +1 -0
  234. package/dist/nodes/Polar/resources/licenseKey/activate.d.ts +2 -0
  235. package/dist/nodes/Polar/resources/licenseKey/activate.js +39 -0
  236. package/dist/nodes/Polar/resources/licenseKey/activate.js.map +1 -0
  237. package/dist/nodes/Polar/resources/licenseKey/deactivate.d.ts +2 -0
  238. package/dist/nodes/Polar/resources/licenseKey/deactivate.js +35 -0
  239. package/dist/nodes/Polar/resources/licenseKey/deactivate.js.map +1 -0
  240. package/dist/nodes/Polar/resources/licenseKey/get.d.ts +2 -0
  241. package/dist/nodes/Polar/resources/licenseKey/get.js +16 -0
  242. package/dist/nodes/Polar/resources/licenseKey/get.js.map +1 -0
  243. package/dist/nodes/Polar/resources/licenseKey/getActivation.d.ts +2 -0
  244. package/dist/nodes/Polar/resources/licenseKey/getActivation.js +23 -0
  245. package/dist/nodes/Polar/resources/licenseKey/getActivation.js.map +1 -0
  246. package/dist/nodes/Polar/resources/licenseKey/getAll.d.ts +2 -0
  247. package/dist/nodes/Polar/resources/licenseKey/getAll.js +38 -0
  248. package/dist/nodes/Polar/resources/licenseKey/getAll.js.map +1 -0
  249. package/dist/nodes/Polar/resources/licenseKey/index.d.ts +2 -0
  250. package/dist/nodes/Polar/resources/licenseKey/index.js +85 -0
  251. package/dist/nodes/Polar/resources/licenseKey/index.js.map +1 -0
  252. package/dist/nodes/Polar/resources/licenseKey/update.d.ts +2 -0
  253. package/dist/nodes/Polar/resources/licenseKey/update.js +70 -0
  254. package/dist/nodes/Polar/resources/licenseKey/update.js.map +1 -0
  255. package/dist/nodes/Polar/resources/licenseKey/validate.d.ts +2 -0
  256. package/dist/nodes/Polar/resources/licenseKey/validate.js +69 -0
  257. package/dist/nodes/Polar/resources/licenseKey/validate.js.map +1 -0
  258. package/dist/nodes/Polar/resources/member/create.d.ts +2 -0
  259. package/dist/nodes/Polar/resources/member/create.js +64 -0
  260. package/dist/nodes/Polar/resources/member/create.js.map +1 -0
  261. package/dist/nodes/Polar/resources/member/delete.d.ts +2 -0
  262. package/dist/nodes/Polar/resources/member/delete.js +15 -0
  263. package/dist/nodes/Polar/resources/member/delete.js.map +1 -0
  264. package/dist/nodes/Polar/resources/member/get.d.ts +2 -0
  265. package/dist/nodes/Polar/resources/member/get.js +15 -0
  266. package/dist/nodes/Polar/resources/member/get.js.map +1 -0
  267. package/dist/nodes/Polar/resources/member/getAll.d.ts +2 -0
  268. package/dist/nodes/Polar/resources/member/getAll.js +45 -0
  269. package/dist/nodes/Polar/resources/member/getAll.js.map +1 -0
  270. package/dist/nodes/Polar/resources/member/getByExternalId.d.ts +2 -0
  271. package/dist/nodes/Polar/resources/member/getByExternalId.js +41 -0
  272. package/dist/nodes/Polar/resources/member/getByExternalId.js.map +1 -0
  273. package/dist/nodes/Polar/resources/member/index.d.ts +2 -0
  274. package/dist/nodes/Polar/resources/member/index.js +71 -0
  275. package/dist/nodes/Polar/resources/member/index.js.map +1 -0
  276. package/dist/nodes/Polar/resources/member/update.d.ts +2 -0
  277. package/dist/nodes/Polar/resources/member/update.js +45 -0
  278. package/dist/nodes/Polar/resources/member/update.js.map +1 -0
  279. package/dist/nodes/Polar/resources/meter/create.d.ts +2 -0
  280. package/dist/nodes/Polar/resources/meter/create.js +177 -0
  281. package/dist/nodes/Polar/resources/meter/create.js.map +1 -0
  282. package/dist/nodes/Polar/resources/meter/get.d.ts +2 -0
  283. package/dist/nodes/Polar/resources/meter/get.js +15 -0
  284. package/dist/nodes/Polar/resources/meter/get.js.map +1 -0
  285. package/dist/nodes/Polar/resources/meter/getAll.d.ts +2 -0
  286. package/dist/nodes/Polar/resources/meter/getAll.js +35 -0
  287. package/dist/nodes/Polar/resources/meter/getAll.js.map +1 -0
  288. package/dist/nodes/Polar/resources/meter/getQuantities.d.ts +2 -0
  289. package/dist/nodes/Polar/resources/meter/getQuantities.js +97 -0
  290. package/dist/nodes/Polar/resources/meter/getQuantities.js.map +1 -0
  291. package/dist/nodes/Polar/resources/meter/index.d.ts +2 -0
  292. package/dist/nodes/Polar/resources/meter/index.js +62 -0
  293. package/dist/nodes/Polar/resources/meter/index.js.map +1 -0
  294. package/dist/nodes/Polar/resources/meter/update.d.ts +2 -0
  295. package/dist/nodes/Polar/resources/meter/update.js +190 -0
  296. package/dist/nodes/Polar/resources/meter/update.js.map +1 -0
  297. package/dist/nodes/Polar/resources/order/create.d.ts +2 -0
  298. package/dist/nodes/Polar/resources/order/create.js +51 -0
  299. package/dist/nodes/Polar/resources/order/create.js.map +1 -0
  300. package/dist/nodes/Polar/resources/order/finalize.d.ts +2 -0
  301. package/dist/nodes/Polar/resources/order/finalize.js +31 -0
  302. package/dist/nodes/Polar/resources/order/finalize.js.map +1 -0
  303. package/dist/nodes/Polar/resources/order/generateInvoice.d.ts +2 -0
  304. package/dist/nodes/Polar/resources/order/generateInvoice.js +16 -0
  305. package/dist/nodes/Polar/resources/order/generateInvoice.js.map +1 -0
  306. package/dist/nodes/Polar/resources/order/get.d.ts +2 -0
  307. package/dist/nodes/Polar/resources/order/get.js +15 -0
  308. package/dist/nodes/Polar/resources/order/get.js.map +1 -0
  309. package/dist/nodes/Polar/resources/order/getAll.d.ts +2 -0
  310. package/dist/nodes/Polar/resources/order/getAll.js +101 -0
  311. package/dist/nodes/Polar/resources/order/getAll.js.map +1 -0
  312. package/dist/nodes/Polar/resources/order/getInvoice.d.ts +2 -0
  313. package/dist/nodes/Polar/resources/order/getInvoice.js +15 -0
  314. package/dist/nodes/Polar/resources/order/getInvoice.js.map +1 -0
  315. package/dist/nodes/Polar/resources/order/getReceipt.d.ts +2 -0
  316. package/dist/nodes/Polar/resources/order/getReceipt.js +15 -0
  317. package/dist/nodes/Polar/resources/order/getReceipt.js.map +1 -0
  318. package/dist/nodes/Polar/resources/order/index.d.ts +2 -0
  319. package/dist/nodes/Polar/resources/order/index.js +89 -0
  320. package/dist/nodes/Polar/resources/order/index.js.map +1 -0
  321. package/dist/nodes/Polar/resources/order/update.d.ts +2 -0
  322. package/dist/nodes/Polar/resources/order/update.js +31 -0
  323. package/dist/nodes/Polar/resources/order/update.js.map +1 -0
  324. package/dist/nodes/Polar/resources/organizationAccessToken/create.d.ts +2 -0
  325. package/dist/nodes/Polar/resources/organizationAccessToken/create.js +46 -0
  326. package/dist/nodes/Polar/resources/organizationAccessToken/create.js.map +1 -0
  327. package/dist/nodes/Polar/resources/organizationAccessToken/delete.d.ts +2 -0
  328. package/dist/nodes/Polar/resources/organizationAccessToken/delete.js +16 -0
  329. package/dist/nodes/Polar/resources/organizationAccessToken/delete.js.map +1 -0
  330. package/dist/nodes/Polar/resources/organizationAccessToken/getAll.d.ts +2 -0
  331. package/dist/nodes/Polar/resources/organizationAccessToken/getAll.js +7 -0
  332. package/dist/nodes/Polar/resources/organizationAccessToken/getAll.js.map +1 -0
  333. package/dist/nodes/Polar/resources/organizationAccessToken/index.d.ts +2 -0
  334. package/dist/nodes/Polar/resources/organizationAccessToken/index.js +63 -0
  335. package/dist/nodes/Polar/resources/organizationAccessToken/index.js.map +1 -0
  336. package/dist/nodes/Polar/resources/organizationAccessToken/update.d.ts +2 -0
  337. package/dist/nodes/Polar/resources/organizationAccessToken/update.js +43 -0
  338. package/dist/nodes/Polar/resources/organizationAccessToken/update.js.map +1 -0
  339. package/dist/nodes/Polar/resources/payment/get.d.ts +2 -0
  340. package/dist/nodes/Polar/resources/payment/get.js +15 -0
  341. package/dist/nodes/Polar/resources/payment/get.js.map +1 -0
  342. package/dist/nodes/Polar/resources/payment/getAll.d.ts +2 -0
  343. package/dist/nodes/Polar/resources/payment/getAll.js +72 -0
  344. package/dist/nodes/Polar/resources/payment/getAll.js.map +1 -0
  345. package/dist/nodes/Polar/resources/payment/index.d.ts +2 -0
  346. package/dist/nodes/Polar/resources/payment/index.js +35 -0
  347. package/dist/nodes/Polar/resources/payment/index.js.map +1 -0
  348. package/dist/nodes/Polar/resources/product/create.d.ts +2 -0
  349. package/dist/nodes/Polar/resources/product/create.js +259 -0
  350. package/dist/nodes/Polar/resources/product/create.js.map +1 -0
  351. package/dist/nodes/Polar/resources/product/get.d.ts +2 -0
  352. package/dist/nodes/Polar/resources/product/get.js +15 -0
  353. package/dist/nodes/Polar/resources/product/get.js.map +1 -0
  354. package/dist/nodes/Polar/resources/product/getAll.d.ts +2 -0
  355. package/dist/nodes/Polar/resources/product/getAll.js +68 -0
  356. package/dist/nodes/Polar/resources/product/getAll.js.map +1 -0
  357. package/dist/nodes/Polar/resources/product/index.d.ts +2 -0
  358. package/dist/nodes/Polar/resources/product/index.js +62 -0
  359. package/dist/nodes/Polar/resources/product/index.js.map +1 -0
  360. package/dist/nodes/Polar/resources/product/update.d.ts +2 -0
  361. package/dist/nodes/Polar/resources/product/update.js +102 -0
  362. package/dist/nodes/Polar/resources/product/update.js.map +1 -0
  363. package/dist/nodes/Polar/resources/product/updateBenefits.d.ts +2 -0
  364. package/dist/nodes/Polar/resources/product/updateBenefits.js +26 -0
  365. package/dist/nodes/Polar/resources/product/updateBenefits.js.map +1 -0
  366. package/dist/nodes/Polar/resources/refund/create.d.ts +2 -0
  367. package/dist/nodes/Polar/resources/refund/create.js +71 -0
  368. package/dist/nodes/Polar/resources/refund/create.js.map +1 -0
  369. package/dist/nodes/Polar/resources/refund/getAll.d.ts +2 -0
  370. package/dist/nodes/Polar/resources/refund/getAll.js +55 -0
  371. package/dist/nodes/Polar/resources/refund/getAll.js.map +1 -0
  372. package/dist/nodes/Polar/resources/refund/index.d.ts +2 -0
  373. package/dist/nodes/Polar/resources/refund/index.js +35 -0
  374. package/dist/nodes/Polar/resources/refund/index.js.map +1 -0
  375. package/dist/nodes/Polar/resources/subscription/cancel.d.ts +2 -0
  376. package/dist/nodes/Polar/resources/subscription/cancel.js +63 -0
  377. package/dist/nodes/Polar/resources/subscription/cancel.js.map +1 -0
  378. package/dist/nodes/Polar/resources/subscription/clearPendingUpdate.d.ts +2 -0
  379. package/dist/nodes/Polar/resources/subscription/clearPendingUpdate.js +17 -0
  380. package/dist/nodes/Polar/resources/subscription/clearPendingUpdate.js.map +1 -0
  381. package/dist/nodes/Polar/resources/subscription/create.d.ts +2 -0
  382. package/dist/nodes/Polar/resources/subscription/create.js +41 -0
  383. package/dist/nodes/Polar/resources/subscription/create.js.map +1 -0
  384. package/dist/nodes/Polar/resources/subscription/get.d.ts +2 -0
  385. package/dist/nodes/Polar/resources/subscription/get.js +15 -0
  386. package/dist/nodes/Polar/resources/subscription/get.js.map +1 -0
  387. package/dist/nodes/Polar/resources/subscription/getAll.d.ts +2 -0
  388. package/dist/nodes/Polar/resources/subscription/getAll.js +106 -0
  389. package/dist/nodes/Polar/resources/subscription/getAll.js.map +1 -0
  390. package/dist/nodes/Polar/resources/subscription/index.d.ts +2 -0
  391. package/dist/nodes/Polar/resources/subscription/index.js +116 -0
  392. package/dist/nodes/Polar/resources/subscription/index.js.map +1 -0
  393. package/dist/nodes/Polar/resources/subscription/pause.d.ts +2 -0
  394. package/dist/nodes/Polar/resources/subscription/pause.js +40 -0
  395. package/dist/nodes/Polar/resources/subscription/pause.js.map +1 -0
  396. package/dist/nodes/Polar/resources/subscription/resume.d.ts +2 -0
  397. package/dist/nodes/Polar/resources/subscription/resume.js +17 -0
  398. package/dist/nodes/Polar/resources/subscription/resume.js.map +1 -0
  399. package/dist/nodes/Polar/resources/subscription/revoke.d.ts +2 -0
  400. package/dist/nodes/Polar/resources/subscription/revoke.js +16 -0
  401. package/dist/nodes/Polar/resources/subscription/revoke.js.map +1 -0
  402. package/dist/nodes/Polar/resources/subscription/update.d.ts +2 -0
  403. package/dist/nodes/Polar/resources/subscription/update.js +62 -0
  404. package/dist/nodes/Polar/resources/subscription/update.js.map +1 -0
  405. package/dist/nodes/Polar/resources/subscription/updateBillingPeriod.d.ts +2 -0
  406. package/dist/nodes/Polar/resources/subscription/updateBillingPeriod.js +25 -0
  407. package/dist/nodes/Polar/resources/subscription/updateBillingPeriod.js.map +1 -0
  408. package/dist/nodes/Polar/resources/subscription/updateSeats.d.ts +2 -0
  409. package/dist/nodes/Polar/resources/subscription/updateSeats.js +38 -0
  410. package/dist/nodes/Polar/resources/subscription/updateSeats.js.map +1 -0
  411. package/dist/nodes/Polar/resources/webhookDelivery/getAll.d.ts +2 -0
  412. package/dist/nodes/Polar/resources/webhookDelivery/getAll.js +82 -0
  413. package/dist/nodes/Polar/resources/webhookDelivery/getAll.js.map +1 -0
  414. package/dist/nodes/Polar/resources/webhookDelivery/index.d.ts +2 -0
  415. package/dist/nodes/Polar/resources/webhookDelivery/index.js +40 -0
  416. package/dist/nodes/Polar/resources/webhookDelivery/index.js.map +1 -0
  417. package/dist/nodes/Polar/resources/webhookDelivery/redeliver.d.ts +2 -0
  418. package/dist/nodes/Polar/resources/webhookDelivery/redeliver.js +16 -0
  419. package/dist/nodes/Polar/resources/webhookDelivery/redeliver.js.map +1 -0
  420. package/dist/nodes/Polar/resources/webhookEndpoint/create.d.ts +2 -0
  421. package/dist/nodes/Polar/resources/webhookEndpoint/create.js +62 -0
  422. package/dist/nodes/Polar/resources/webhookEndpoint/create.js.map +1 -0
  423. package/dist/nodes/Polar/resources/webhookEndpoint/delete.d.ts +2 -0
  424. package/dist/nodes/Polar/resources/webhookEndpoint/delete.js +15 -0
  425. package/dist/nodes/Polar/resources/webhookEndpoint/delete.js.map +1 -0
  426. package/dist/nodes/Polar/resources/webhookEndpoint/get.d.ts +2 -0
  427. package/dist/nodes/Polar/resources/webhookEndpoint/get.js +15 -0
  428. package/dist/nodes/Polar/resources/webhookEndpoint/get.js.map +1 -0
  429. package/dist/nodes/Polar/resources/webhookEndpoint/getAll.d.ts +2 -0
  430. package/dist/nodes/Polar/resources/webhookEndpoint/getAll.js +7 -0
  431. package/dist/nodes/Polar/resources/webhookEndpoint/getAll.js.map +1 -0
  432. package/dist/nodes/Polar/resources/webhookEndpoint/index.d.ts +2 -0
  433. package/dist/nodes/Polar/resources/webhookEndpoint/index.js +91 -0
  434. package/dist/nodes/Polar/resources/webhookEndpoint/index.js.map +1 -0
  435. package/dist/nodes/Polar/resources/webhookEndpoint/resetSecret.d.ts +2 -0
  436. package/dist/nodes/Polar/resources/webhookEndpoint/resetSecret.js +16 -0
  437. package/dist/nodes/Polar/resources/webhookEndpoint/resetSecret.js.map +1 -0
  438. package/dist/nodes/Polar/resources/webhookEndpoint/update.d.ts +2 -0
  439. package/dist/nodes/Polar/resources/webhookEndpoint/update.js +72 -0
  440. package/dist/nodes/Polar/resources/webhookEndpoint/update.js.map +1 -0
  441. package/dist/nodes/Polar/shared/descriptions.d.ts +13 -0
  442. package/dist/nodes/Polar/shared/descriptions.js +346 -0
  443. package/dist/nodes/Polar/shared/descriptions.js.map +1 -0
  444. package/dist/nodes/Polar/shared/transport.d.ts +2 -0
  445. package/dist/nodes/Polar/shared/transport.js +16 -0
  446. package/dist/nodes/Polar/shared/transport.js.map +1 -0
  447. package/dist/nodes/Polar/shared/utils.d.ts +3 -0
  448. package/dist/nodes/Polar/shared/utils.js +13 -0
  449. package/dist/nodes/Polar/shared/utils.js.map +1 -0
  450. package/dist/nodes/PolarTrigger/PolarTrigger.node.d.ts +12 -0
  451. package/dist/nodes/PolarTrigger/PolarTrigger.node.js +182 -0
  452. package/dist/nodes/PolarTrigger/PolarTrigger.node.js.map +1 -0
  453. package/dist/nodes/PolarTrigger/PolarTrigger.node.json +11 -0
  454. package/dist/package.json +58 -0
  455. package/dist/tsconfig.tsbuildinfo +1 -0
  456. package/package.json +58 -0
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2026 JUSTONEMONKEY
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ ![Banner image](./assets/Polar_Flow_03.webp)
2
+
3
+ # n8n-nodes-polar-sh
4
+
5
+ This is an n8n community node package. It lets you manage [Polar.sh](https://polar.sh) — checkouts, checkout links, customers, orders, subscriptions, and refunds — directly from n8n workflows, and react to Polar webhook events with a dedicated trigger node.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Nodes](#nodes)
11
+ [Credentials](#credentials)
12
+ [Local development & testing](#local-development--testing)
13
+ [Compatibility](#compatibility)
14
+ [Resources](#resources)
15
+
16
+ ## Installation
17
+
18
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation, and install `@justonemonkey/n8n-nodes-polar-sh`.
19
+
20
+ ## Nodes
21
+
22
+ ### Polar
23
+
24
+ Resource + Operation node covering:
25
+
26
+ - **Benefit** — Get Many, Get, Create, Update, Delete, Get Grants
27
+ - **Benefit Grant** — Get Many
28
+ - **Checkout** — Get Many, Get, Create, Update
29
+ - **Checkout Link** — Get Many, Get, Create, Update, Delete
30
+ - **Custom Field** — Create, Delete, Get, Get Many, Update — org-defined extra data fields (text/number/date/checkbox/select) collected on checkout
31
+ - **Customer** — Get Many, Get, Get by External ID, Create, Update, Update by External ID, Delete, Delete by External ID, Get State, Get State by External ID, Get Payment Methods
32
+ - **Customer Meter** — Get Many, Get
33
+ - **Customer Seat** — Assign Seat, Claim Seat, Get Claim Info, Get Many, Resend Invitation, Revoke Seat — assign, revoke, and manage seat-based subscription/order member seats; Get Claim Info and Claim Seat require no Polar authentication (they're for the invited person's own client)
34
+ - **Customer Session** — Create — generate a one-time customer portal access token
35
+ - **Discount** — Get Many, Get, Create, Update, Delete
36
+ - **Dispute** — Get, Get Many — read-only view of payment disputes/chargebacks
37
+ - **Event** — Get Many, Get, Ingest, List Names
38
+ - **Event Type** — Get Many, Update
39
+ - **File** — Complete Upload, Create, Delete, Get Many, Update — declarative primitives for Polar's S3 multipart file upload flow (Create returns presigned upload URLs; actually PUTing file bytes to S3 is done in your own workflow, e.g. with an HTTP Request node, before calling Complete Upload)
40
+ - **License Key** — Activate, Deactivate, Get, Get Activation, Get Many, Update, Validate — license-gated software activation and validation
41
+ - **Member** — Create, Delete, Get, Get by External ID, Get Many, Update — manage individual people within a B2B customer (requires the organization's member-management feature)
42
+ - **Meter** — Create, Get, Get Many, Get Quantities, Update
43
+ - **Order** — Get Many, Get, Create, Update, Finalize, Generate Invoice, Get Invoice, Get Receipt
44
+ - **Organization Access Token** — Create, Delete, Get Many, Update — manage the org-scoped API tokens themselves (the same kind of token this package's own credential uses). The raw token value is only returned once, at creation.
45
+ - **Payment** — Get Many, Get — read-only view of payments (`payments:read` only; no create/update/delete exists in the API)
46
+ - **Product** — Get Many, Get, Create, Update, Update Benefits
47
+ - **Refund** — Get Many, Create
48
+ - **Subscription** — Get Many, Get, Create, Update, Update Seats, Update Billing Period, Cancel, Revoke, Pause, Resume, Clear Pending Update
49
+ - **Webhook Delivery** — Get Many, Redeliver — delivery history for webhook events, and scheduling redelivery of a specific event
50
+ - **Webhook Endpoint** — Create, Delete, Get, Get Many, Reset Secret, Update — manage webhook subscriptions (URL, payload format, subscribed event types). Reset Secret immediately invalidates the previous signing secret.
51
+
52
+ ### Polar Trigger
53
+
54
+ A webhook trigger node for Polar's ~30 event types (`checkout.*`, `customer.*`, `subscription.*`, `order.*`, `refund.*`, `benefit_grant.*`, `benefit.*`, `product.*`, `discount.*`, `organization.updated`). You create the webhook endpoint by hand in the Polar dashboard, pointing it at this node's webhook URL, and paste the generated signing secret into the node. Signatures are verified against the [Standard Webhooks](https://www.standardwebhooks.com/) spec.
55
+
56
+ By default the node listens for a single event type. Turn on **Allow Multiple Events** (mirrors n8n's core Webhook node's "Allow Multiple HTTP Methods" setting) to select several event types at once — the node then exposes one output per selected event, in the order selected, and routes each incoming webhook to the output matching its `type`.
57
+
58
+ The webhook **Path** field is empty by default, in which case the node's URL ends in its own automatically-generated unique ID (the same behavior as n8n's core Webhook node) — no two `Polar Trigger` nodes ever collide on the same URL. Set your own value only if you need a specific, predictable path. If you activate a workflow, change the Path, and reactivate, update the corresponding endpoint URL in the Polar dashboard to match.
59
+
60
+ ## Credentials
61
+
62
+ This node uses a **Polar API** credential:
63
+
64
+ 1. In Polar, go to your organization's **Settings → API Keys** (or the Sandbox equivalent at [sandbox.polar.sh](https://sandbox.polar.sh) for testing) and create an **Organization Access Token**.
65
+ 2. In n8n, create a new `Polar API` credential, choose **Environment** (`Production` or `Sandbox`), and paste the token into **Access Token**.
66
+
67
+ ## Local development & testing
68
+
69
+ 1. Clone the repo and install dependencies:
70
+
71
+ ```bash
72
+ npm install
73
+ ```
74
+
75
+ 2. Start n8n with the node loaded and hot-reloading:
76
+
77
+ ```bash
78
+ npm run dev
79
+ ```
80
+
81
+ This opens n8n at `http://localhost:5678`.
82
+
83
+ 3. Create a **Polar API** credential using a **Sandbox** organization access token (sign up/create a sandbox org at [sandbox.polar.sh](https://sandbox.polar.sh) — it's a fully separate environment from production, safe to test destructive operations against).
84
+
85
+ 4. Exercise every `Polar` node operation against Sandbox data before pushing — each task in the implementation plan (`docs/superpowers/plans/2026-08-18-polar-node-lot1a-foundation.md`) lists the specific operations to click through for that resource.
86
+
87
+ 5. To test the **Polar Trigger** node, `npm run dev` only serves n8n on `localhost`, which Polar's servers can't reach. Expose it publicly first, then register a Sandbox webhook endpoint against the tunnel URL:
88
+
89
+ ```bash
90
+ npm run dev -- --tunnel
91
+ ```
92
+
93
+ (or run `npm run dev` in one terminal and `ngrok http 5678` in another, and use the `ngrok` URL). Copy the webhook URL n8n shows on the `Polar Trigger` node, create a matching endpoint in the Sandbox dashboard's **Webhooks** settings, select the events you want to test, and paste the generated secret into the node's `Webhook Secret` field. Trigger a real Sandbox event (e.g. run the `Polar` node's Checkout → Create) and confirm the workflow fires.
94
+
95
+ 6. Before pushing, both of these must pass:
96
+
97
+ ```bash
98
+ npm run lint
99
+ npm run build
100
+ ```
101
+
102
+ ## Compatibility
103
+
104
+ Requires n8n with the community nodes API version 1 (`n8nNodesApiVersion: 1`). Built and tested against Node.js v22+.
105
+
106
+ Every field and endpoint in this package is grounded against Polar's live OpenAPI spec (https://polar.sh/docs/openapi.yaml), last verified 2026-08-20. Polar's API is versionless (everything lives under `/v1/`, evolving continuously) rather than pinned to discrete release numbers, so a verification date is the meaningful compatibility marker here, not a version string.
107
+
108
+ ## Resources
109
+
110
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
111
+ - [Polar API reference](https://polar.sh/docs/api-reference/introduction)
112
+ - [Polar webhook events](https://polar.sh/docs/integrate/webhooks/events)
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class PolarApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PolarApi = void 0;
4
+ class PolarApi {
5
+ constructor() {
6
+ this.name = 'polarApi';
7
+ this.displayName = 'Polar API';
8
+ this.icon = { light: 'file:../icons/polar.svg', dark: 'file:../icons/polar.dark.svg' };
9
+ this.documentationUrl = 'https://polar.sh/docs/api-reference/introduction';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Environment',
13
+ name: 'environment',
14
+ type: 'options',
15
+ options: [
16
+ { name: 'Production', value: 'production' },
17
+ { name: 'Sandbox', value: 'sandbox' },
18
+ ],
19
+ default: 'production',
20
+ description: 'Whether to call the live Polar API or the Sandbox environment',
21
+ },
22
+ {
23
+ displayName: 'Access Token',
24
+ name: 'accessToken',
25
+ type: 'string',
26
+ typeOptions: { password: true },
27
+ default: '',
28
+ required: true,
29
+ description: 'A Polar Organization Access Token (polar_oat_...), created from the Polar dashboard',
30
+ },
31
+ ];
32
+ this.authenticate = {
33
+ type: 'generic',
34
+ properties: {
35
+ headers: {
36
+ Authorization: '=Bearer {{$credentials.accessToken}}',
37
+ },
38
+ },
39
+ };
40
+ this.test = {
41
+ request: {
42
+ baseURL: '={{$credentials.environment === "sandbox" ? "https://sandbox-api.polar.sh" : "https://api.polar.sh"}}',
43
+ url: '/v1/organizations/',
44
+ method: 'GET',
45
+ },
46
+ };
47
+ }
48
+ }
49
+ exports.PolarApi = PolarApi;
50
+ //# sourceMappingURL=PolarApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolarApi.credentials.js","sourceRoot":"","sources":["../../credentials/PolarApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,QAAQ;IAArB;QACC,SAAI,GAAG,UAAU,CAAC;QAElB,gBAAW,GAAG,WAAW,CAAC;QAE1B,SAAI,GAAS,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;QAExF,qBAAgB,GAAG,kDAAkD,CAAC;QAEtE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACrC;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,+DAA+D;aAC5E;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qFAAqF;aAClG;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EACN,uGAAuG;gBACxG,GAAG,EAAE,oBAAoB;gBACzB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAjDD,4BAiDC"}
@@ -0,0 +1,10 @@
1
+ <svg width="40" height="40" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1_4)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M66.4284 274.26C134.876 320.593 227.925 302.666 274.258 234.219C320.593 165.771 302.666 72.7222 234.218 26.3885C165.77 -19.9451 72.721 -2.0181 26.3873 66.4297C-19.9465 134.877 -2.01938 227.927 66.4284 274.26ZM47.9555 116.67C30.8375 169.263 36.5445 221.893 59.2454 256.373C18.0412 217.361 7.27564 150.307 36.9437 92.318C55.9152 55.2362 87.5665 29.3937 122.5 18.3483C90.5911 36.7105 62.5549 71.8144 47.9555 116.67ZM175.347 283.137C211.377 272.606 244.211 246.385 263.685 208.322C293.101 150.825 282.768 84.4172 242.427 45.2673C264.22 79.7626 269.473 131.542 252.631 183.287C237.615 229.421 208.385 265.239 175.347 283.137ZM183.627 266.229C207.945 245.418 228.016 210.604 236.936 168.79C251.033 102.693 232.551 41.1978 195.112 20.6768C214.97 47.3945 225.022 99.2902 218.824 157.333C214.085 201.724 200.814 240.593 183.627 266.229ZM63.7178 131.844C49.5155 198.43 68.377 260.345 106.374 280.405C85.9962 254.009 75.5969 201.514 81.8758 142.711C86.5375 99.0536 99.4504 60.737 116.225 35.0969C92.2678 55.983 72.5384 90.4892 63.7178 131.844ZM199.834 149.561C200.908 217.473 179.59 272.878 152.222 273.309C124.853 273.742 101.797 219.039 100.724 151.127C99.6511 83.2138 120.968 27.8094 148.337 27.377C175.705 26.9446 198.762 81.648 199.834 149.561Z" fill="white"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_1_4">
7
+ <rect width="300" height="300" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg width="40" height="40" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1_4)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M66.4284 274.26C134.876 320.593 227.925 302.666 274.258 234.219C320.593 165.771 302.666 72.7222 234.218 26.3885C165.77 -19.9451 72.721 -2.0181 26.3873 66.4297C-19.9465 134.877 -2.01938 227.927 66.4284 274.26ZM47.9555 116.67C30.8375 169.263 36.5445 221.893 59.2454 256.373C18.0412 217.361 7.27564 150.307 36.9437 92.318C55.9152 55.2362 87.5665 29.3937 122.5 18.3483C90.5911 36.7105 62.5549 71.8144 47.9555 116.67ZM175.347 283.137C211.377 272.606 244.211 246.385 263.685 208.322C293.101 150.825 282.768 84.4172 242.427 45.2673C264.22 79.7626 269.473 131.542 252.631 183.287C237.615 229.421 208.385 265.239 175.347 283.137ZM183.627 266.229C207.945 245.418 228.016 210.604 236.936 168.79C251.033 102.693 232.551 41.1978 195.112 20.6768C214.97 47.3945 225.022 99.2902 218.824 157.333C214.085 201.724 200.814 240.593 183.627 266.229ZM63.7178 131.844C49.5155 198.43 68.377 260.345 106.374 280.405C85.9962 254.009 75.5969 201.514 81.8758 142.711C86.5375 99.0536 99.4504 60.737 116.225 35.0969C92.2678 55.983 72.5384 90.4892 63.7178 131.844ZM199.834 149.561C200.908 217.473 179.59 272.878 152.222 273.309C124.853 273.742 101.797 219.039 100.724 151.127C99.6511 83.2138 120.968 27.8094 148.337 27.377C175.705 26.9446 198.762 81.648 199.834 149.561Z" fill="black"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_1_4">
7
+ <rect width="300" height="300" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,20 @@
1
+ import { type INodeType, type INodeTypeDescription } from 'n8n-workflow';
2
+ import { getProducts } from './listSearch/getProducts';
3
+ import { getCustomers } from './listSearch/getCustomers';
4
+ import { getBenefits } from './listSearch/getBenefits';
5
+ import { getProductOptions } from './loadOptions/getProductOptions';
6
+ import { getBenefitOptions } from './loadOptions/getBenefitOptions';
7
+ export declare class Polar implements INodeType {
8
+ description: INodeTypeDescription;
9
+ methods: {
10
+ listSearch: {
11
+ getProducts: typeof getProducts;
12
+ getCustomers: typeof getCustomers;
13
+ getBenefits: typeof getBenefits;
14
+ };
15
+ loadOptions: {
16
+ getProductOptions: typeof getProductOptions;
17
+ getBenefitOptions: typeof getBenefitOptions;
18
+ };
19
+ };
20
+ }
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Polar = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const benefit_1 = require("./resources/benefit");
6
+ const benefitGrant_1 = require("./resources/benefitGrant");
7
+ const checkout_1 = require("./resources/checkout");
8
+ const checkoutLink_1 = require("./resources/checkoutLink");
9
+ const customField_1 = require("./resources/customField");
10
+ const customer_1 = require("./resources/customer");
11
+ const customerMeter_1 = require("./resources/customerMeter");
12
+ const customerSeat_1 = require("./resources/customerSeat");
13
+ const customerSession_1 = require("./resources/customerSession");
14
+ const discount_1 = require("./resources/discount");
15
+ const dispute_1 = require("./resources/dispute");
16
+ const event_1 = require("./resources/event");
17
+ const eventType_1 = require("./resources/eventType");
18
+ const file_1 = require("./resources/file");
19
+ const licenseKey_1 = require("./resources/licenseKey");
20
+ const member_1 = require("./resources/member");
21
+ const meter_1 = require("./resources/meter");
22
+ const order_1 = require("./resources/order");
23
+ const organizationAccessToken_1 = require("./resources/organizationAccessToken");
24
+ const payment_1 = require("./resources/payment");
25
+ const product_1 = require("./resources/product");
26
+ const refund_1 = require("./resources/refund");
27
+ const subscription_1 = require("./resources/subscription");
28
+ const webhookDelivery_1 = require("./resources/webhookDelivery");
29
+ const webhookEndpoint_1 = require("./resources/webhookEndpoint");
30
+ const getProducts_1 = require("./listSearch/getProducts");
31
+ const getCustomers_1 = require("./listSearch/getCustomers");
32
+ const getBenefits_1 = require("./listSearch/getBenefits");
33
+ const getProductOptions_1 = require("./loadOptions/getProductOptions");
34
+ const getBenefitOptions_1 = require("./loadOptions/getBenefitOptions");
35
+ class Polar {
36
+ constructor() {
37
+ this.description = {
38
+ displayName: 'Polar',
39
+ name: 'polar',
40
+ icon: { light: 'file:../../icons/polar.svg', dark: 'file:../../icons/polar.dark.svg' },
41
+ group: ['transform'],
42
+ version: 1,
43
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
44
+ description: 'Consume the Polar.sh API',
45
+ defaults: {
46
+ name: 'Polar',
47
+ },
48
+ usableAsTool: true,
49
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
50
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
51
+ credentials: [
52
+ {
53
+ name: 'polarApi',
54
+ required: true,
55
+ },
56
+ ],
57
+ requestDefaults: {
58
+ baseURL: '={{$credentials.environment === "sandbox" ? "https://sandbox-api.polar.sh" : "https://api.polar.sh"}}/v1',
59
+ headers: {
60
+ Accept: 'application/json',
61
+ 'Content-Type': 'application/json',
62
+ },
63
+ },
64
+ properties: [
65
+ {
66
+ displayName: 'Resource',
67
+ name: 'resource',
68
+ type: 'options',
69
+ noDataExpression: true,
70
+ options: [
71
+ { name: 'Benefit', value: 'benefit' },
72
+ { name: 'Benefit Grant', value: 'benefitGrant' },
73
+ { name: 'Checkout', value: 'checkout' },
74
+ { name: 'Checkout Link', value: 'checkoutLink' },
75
+ { name: 'Custom Field', value: 'customField' },
76
+ { name: 'Customer', value: 'customer' },
77
+ { name: 'Customer Meter', value: 'customerMeter' },
78
+ { name: 'Customer Seat', value: 'customerSeat' },
79
+ { name: 'Customer Session', value: 'customerSession' },
80
+ { name: 'Discount', value: 'discount' },
81
+ { name: 'Dispute', value: 'dispute' },
82
+ { name: 'Event', value: 'event' },
83
+ { name: 'Event Type', value: 'eventType' },
84
+ { name: 'File', value: 'file' },
85
+ { name: 'License Key', value: 'licenseKey' },
86
+ { name: 'Member', value: 'member' },
87
+ { name: 'Meter', value: 'meter' },
88
+ { name: 'Order', value: 'order' },
89
+ { name: 'Organization Access Token', value: 'organizationAccessToken' },
90
+ { name: 'Payment', value: 'payment' },
91
+ { name: 'Product', value: 'product' },
92
+ { name: 'Refund', value: 'refund' },
93
+ { name: 'Subscription', value: 'subscription' },
94
+ { name: 'Webhook Delivery', value: 'webhookDelivery' },
95
+ { name: 'Webhook Endpoint', value: 'webhookEndpoint' },
96
+ ],
97
+ default: 'checkout',
98
+ },
99
+ ...benefit_1.benefitDescription,
100
+ ...benefitGrant_1.benefitGrantDescription,
101
+ ...checkout_1.checkoutDescription,
102
+ ...checkoutLink_1.checkoutLinkDescription,
103
+ ...customField_1.customFieldDescription,
104
+ ...customer_1.customerDescription,
105
+ ...customerMeter_1.customerMeterDescription,
106
+ ...customerSeat_1.customerSeatDescription,
107
+ ...customerSession_1.customerSessionDescription,
108
+ ...discount_1.discountDescription,
109
+ ...dispute_1.disputeDescription,
110
+ ...event_1.eventDescription,
111
+ ...eventType_1.eventTypeDescription,
112
+ ...file_1.fileDescription,
113
+ ...licenseKey_1.licenseKeyDescription,
114
+ ...member_1.memberDescription,
115
+ ...meter_1.meterDescription,
116
+ ...order_1.orderDescription,
117
+ ...organizationAccessToken_1.organizationAccessTokenDescription,
118
+ ...payment_1.paymentDescription,
119
+ ...product_1.productDescription,
120
+ ...refund_1.refundDescription,
121
+ ...subscription_1.subscriptionDescription,
122
+ ...webhookDelivery_1.webhookDeliveryDescription,
123
+ ...webhookEndpoint_1.webhookEndpointDescription,
124
+ ],
125
+ };
126
+ this.methods = {
127
+ listSearch: {
128
+ getProducts: getProducts_1.getProducts,
129
+ getCustomers: getCustomers_1.getCustomers,
130
+ getBenefits: getBenefits_1.getBenefits,
131
+ },
132
+ loadOptions: {
133
+ getProductOptions: getProductOptions_1.getProductOptions,
134
+ getBenefitOptions: getBenefitOptions_1.getBenefitOptions,
135
+ },
136
+ };
137
+ }
138
+ }
139
+ exports.Polar = Polar;
140
+ //# sourceMappingURL=Polar.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Polar.node.js","sourceRoot":"","sources":["../../../nodes/Polar/Polar.node.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "node": "n8n-nodes-polar-sh.polar",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Finance", "Developer Tools"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ { "url": "https://polar.sh/docs/api-reference/introduction" }
9
+ ],
10
+ "primaryDocumentation": [
11
+ { "url": "https://polar.sh/docs/api-reference/introduction" }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
2
+ export declare function getBenefits(this: ILoadOptionsFunctions, filter?: string, paginationToken?: string): Promise<INodeListSearchResult>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBenefits = getBenefits;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getBenefits(filter, paginationToken) {
6
+ const page = paginationToken ? +paginationToken : 1;
7
+ const responseData = await transport_1.polarApiRequest.call(this, 'GET', '/benefits/', {
8
+ query: filter,
9
+ page,
10
+ limit: 50,
11
+ });
12
+ const results = responseData.items.map((item) => ({
13
+ name: item.description,
14
+ value: item.id,
15
+ }));
16
+ const nextPaginationToken = page < responseData.pagination.max_page ? String(page + 1) : undefined;
17
+ return { results, paginationToken: nextPaginationToken };
18
+ }
19
+ //# sourceMappingURL=getBenefits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBenefits.js","sourceRoot":"","sources":["../../../../nodes/Polar/listSearch/getBenefits.ts"],"names":[],"mappings":";;AAMA,kCAmBC;AAxBD,mDAAsD;AAK/C,KAAK,UAAU,WAAW,CAEhC,MAAe,EACf,eAAwB;IAExB,MAAM,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAwB,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;QAC/F,KAAK,EAAE,MAAM;QACb,IAAI;QACJ,KAAK,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,MAAM,OAAO,GAA2B,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzE,IAAI,EAAE,IAAI,CAAC,WAAW;QACtB,KAAK,EAAE,IAAI,CAAC,EAAE;KACd,CAAC,CAAC,CAAC;IAEJ,MAAM,mBAAmB,GAAG,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
2
+ export declare function getCustomers(this: ILoadOptionsFunctions, filter?: string, paginationToken?: string): Promise<INodeListSearchResult>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCustomers = getCustomers;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getCustomers(filter, paginationToken) {
6
+ const page = paginationToken ? +paginationToken : 1;
7
+ const responseData = await transport_1.polarApiRequest.call(this, 'GET', '/customers/', {
8
+ query: filter,
9
+ page,
10
+ limit: 50,
11
+ });
12
+ const results = responseData.items.map((item) => ({
13
+ name: item.name ? `${item.name} (${item.email})` : item.email,
14
+ value: item.id,
15
+ }));
16
+ const nextPaginationToken = page < responseData.pagination.max_page ? String(page + 1) : undefined;
17
+ return { results, paginationToken: nextPaginationToken };
18
+ }
19
+ //# sourceMappingURL=getCustomers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCustomers.js","sourceRoot":"","sources":["../../../../nodes/Polar/listSearch/getCustomers.ts"],"names":[],"mappings":";;AAMA,oCAoBC;AAzBD,mDAAsD;AAK/C,KAAK,UAAU,YAAY,CAEjC,MAAe,EACf,eAAwB;IAExB,MAAM,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAyB,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE;QACjG,KAAK,EAAE,MAAM;QACb,IAAI;QACJ,KAAK,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,MAAM,OAAO,GAA2B,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;QAC7D,KAAK,EAAE,IAAI,CAAC,EAAE;KACd,CAAC,CAAC,CAAC;IAEJ,MAAM,mBAAmB,GACxB,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
2
+ export declare function getProducts(this: ILoadOptionsFunctions, filter?: string, paginationToken?: string): Promise<INodeListSearchResult>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProducts = getProducts;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getProducts(filter, paginationToken) {
6
+ const page = paginationToken ? +paginationToken : 1;
7
+ const responseData = await transport_1.polarApiRequest.call(this, 'GET', '/products/', {
8
+ query: filter,
9
+ page,
10
+ limit: 50,
11
+ });
12
+ const results = responseData.items.map((item) => ({
13
+ name: item.name,
14
+ value: item.id,
15
+ }));
16
+ const nextPaginationToken = page < responseData.pagination.max_page ? String(page + 1) : undefined;
17
+ return { results, paginationToken: nextPaginationToken };
18
+ }
19
+ //# sourceMappingURL=getProducts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getProducts.js","sourceRoot":"","sources":["../../../../nodes/Polar/listSearch/getProducts.ts"],"names":[],"mappings":";;AAMA,kCAoBC;AAzBD,mDAAsD;AAK/C,KAAK,UAAU,WAAW,CAEhC,MAAe,EACf,eAAwB;IAExB,MAAM,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAwB,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;QAC/F,KAAK,EAAE,MAAM;QACb,IAAI;QACJ,KAAK,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,MAAM,OAAO,GAA2B,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzE,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,EAAE;KACd,CAAC,CAAC,CAAC;IAEJ,MAAM,mBAAmB,GACxB,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function getBenefitOptions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBenefitOptions = getBenefitOptions;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getBenefitOptions() {
6
+ const responseData = await transport_1.polarApiRequest.call(this, 'GET', '/benefits/', {
7
+ limit: 100,
8
+ });
9
+ return responseData.items.map((item) => ({ name: item.description, value: item.id }));
10
+ }
11
+ //# sourceMappingURL=getBenefitOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBenefitOptions.js","sourceRoot":"","sources":["../../../../nodes/Polar/loadOptions/getBenefitOptions.ts"],"names":[],"mappings":";;AAMA,8CAMC;AAXD,mDAAsD;AAK/C,KAAK,UAAU,iBAAiB;IACtC,MAAM,YAAY,GAAwB,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;QAC/F,KAAK,EAAE,GAAG;KACV,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function getProductOptions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProductOptions = getProductOptions;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getProductOptions() {
6
+ const responseData = await transport_1.polarApiRequest.call(this, 'GET', '/products/', {
7
+ limit: 100,
8
+ is_archived: false,
9
+ });
10
+ return responseData.items.map((item) => ({ name: item.name, value: item.id }));
11
+ }
12
+ //# sourceMappingURL=getProductOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getProductOptions.js","sourceRoot":"","sources":["../../../../nodes/Polar/loadOptions/getProductOptions.ts"],"names":[],"mappings":";;AAMA,8CAOC;AAZD,mDAAsD;AAK/C,KAAK,UAAU,iBAAiB;IACtC,MAAM,YAAY,GAAwB,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;QAC/F,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAChF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const benefitCreateDescription: INodeProperties[];