@easypayment/medusa-payment-paypal 0.7.4

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 (268) hide show
  1. package/.medusa/server/src/admin/index.js +1267 -0
  2. package/.medusa/server/src/admin/index.mjs +1268 -0
  3. package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.d.ts +3 -0
  4. package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.d.ts.map +1 -0
  5. package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.js +18 -0
  6. package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.js.map +1 -0
  7. package/.medusa/server/src/api/admin/paypal/disconnect/route.d.ts +3 -0
  8. package/.medusa/server/src/api/admin/paypal/disconnect/route.d.ts.map +1 -0
  9. package/.medusa/server/src/api/admin/paypal/disconnect/route.js +9 -0
  10. package/.medusa/server/src/api/admin/paypal/disconnect/route.js.map +1 -0
  11. package/.medusa/server/src/api/admin/paypal/environment/route.d.ts +4 -0
  12. package/.medusa/server/src/api/admin/paypal/environment/route.d.ts.map +1 -0
  13. package/.medusa/server/src/api/admin/paypal/environment/route.js +23 -0
  14. package/.medusa/server/src/api/admin/paypal/environment/route.js.map +1 -0
  15. package/.medusa/server/src/api/admin/paypal/onboard-complete/route.d.ts +4 -0
  16. package/.medusa/server/src/api/admin/paypal/onboard-complete/route.d.ts.map +1 -0
  17. package/.medusa/server/src/api/admin/paypal/onboard-complete/route.js +31 -0
  18. package/.medusa/server/src/api/admin/paypal/onboard-complete/route.js.map +1 -0
  19. package/.medusa/server/src/api/admin/paypal/onboarding-link/route.d.ts +4 -0
  20. package/.medusa/server/src/api/admin/paypal/onboarding-link/route.d.ts.map +1 -0
  21. package/.medusa/server/src/api/admin/paypal/onboarding-link/route.js +35 -0
  22. package/.medusa/server/src/api/admin/paypal/onboarding-link/route.js.map +1 -0
  23. package/.medusa/server/src/api/admin/paypal/onboarding-status/route.d.ts +3 -0
  24. package/.medusa/server/src/api/admin/paypal/onboarding-status/route.d.ts.map +1 -0
  25. package/.medusa/server/src/api/admin/paypal/onboarding-status/route.js +19 -0
  26. package/.medusa/server/src/api/admin/paypal/onboarding-status/route.js.map +1 -0
  27. package/.medusa/server/src/api/admin/paypal/save-credentials/route.d.ts +3 -0
  28. package/.medusa/server/src/api/admin/paypal/save-credentials/route.d.ts.map +1 -0
  29. package/.medusa/server/src/api/admin/paypal/save-credentials/route.js +17 -0
  30. package/.medusa/server/src/api/admin/paypal/save-credentials/route.js.map +1 -0
  31. package/.medusa/server/src/api/admin/paypal/settings/route.d.ts +4 -0
  32. package/.medusa/server/src/api/admin/paypal/settings/route.d.ts.map +1 -0
  33. package/.medusa/server/src/api/admin/paypal/settings/route.js +14 -0
  34. package/.medusa/server/src/api/admin/paypal/settings/route.js.map +1 -0
  35. package/.medusa/server/src/api/admin/paypal/status/route.d.ts +3 -0
  36. package/.medusa/server/src/api/admin/paypal/status/route.d.ts.map +1 -0
  37. package/.medusa/server/src/api/admin/paypal/status/route.js +11 -0
  38. package/.medusa/server/src/api/admin/paypal/status/route.js.map +1 -0
  39. package/.medusa/server/src/api/middlewares.d.ts +3 -0
  40. package/.medusa/server/src/api/middlewares.d.ts.map +1 -0
  41. package/.medusa/server/src/api/middlewares.js +16 -0
  42. package/.medusa/server/src/api/middlewares.js.map +1 -0
  43. package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.d.ts +3 -0
  44. package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.d.ts.map +1 -0
  45. package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.js +43 -0
  46. package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.js.map +1 -0
  47. package/.medusa/server/src/api/store/paypal/capture-order/route.d.ts +3 -0
  48. package/.medusa/server/src/api/store/paypal/capture-order/route.d.ts.map +1 -0
  49. package/.medusa/server/src/api/store/paypal/capture-order/route.js +204 -0
  50. package/.medusa/server/src/api/store/paypal/capture-order/route.js.map +1 -0
  51. package/.medusa/server/src/api/store/paypal/config/route.d.ts +3 -0
  52. package/.medusa/server/src/api/store/paypal/config/route.d.ts.map +1 -0
  53. package/.medusa/server/src/api/store/paypal/config/route.js +77 -0
  54. package/.medusa/server/src/api/store/paypal/config/route.js.map +1 -0
  55. package/.medusa/server/src/api/store/paypal/create-order/route.d.ts +3 -0
  56. package/.medusa/server/src/api/store/paypal/create-order/route.d.ts.map +1 -0
  57. package/.medusa/server/src/api/store/paypal/create-order/route.js +361 -0
  58. package/.medusa/server/src/api/store/paypal/create-order/route.js.map +1 -0
  59. package/.medusa/server/src/api/store/paypal/settings/route.d.ts +3 -0
  60. package/.medusa/server/src/api/store/paypal/settings/route.d.ts.map +1 -0
  61. package/.medusa/server/src/api/store/paypal/settings/route.js +20 -0
  62. package/.medusa/server/src/api/store/paypal/settings/route.js.map +1 -0
  63. package/.medusa/server/src/api/store/paypal/webhook/route.d.ts +3 -0
  64. package/.medusa/server/src/api/store/paypal/webhook/route.d.ts.map +1 -0
  65. package/.medusa/server/src/api/store/paypal/webhook/route.js +250 -0
  66. package/.medusa/server/src/api/store/paypal/webhook/route.js.map +1 -0
  67. package/.medusa/server/src/api/store/paypal-complete/route.d.ts +3 -0
  68. package/.medusa/server/src/api/store/paypal-complete/route.d.ts.map +1 -0
  69. package/.medusa/server/src/api/store/paypal-complete/route.js +76 -0
  70. package/.medusa/server/src/api/store/paypal-complete/route.js.map +1 -0
  71. package/.medusa/server/src/index.d.ts +2 -0
  72. package/.medusa/server/src/index.d.ts.map +1 -0
  73. package/.medusa/server/src/index.js +9 -0
  74. package/.medusa/server/src/index.js.map +1 -0
  75. package/.medusa/server/src/jobs/paypal-webhook-retry.d.ts +7 -0
  76. package/.medusa/server/src/jobs/paypal-webhook-retry.d.ts.map +1 -0
  77. package/.medusa/server/src/jobs/paypal-webhook-retry.js +132 -0
  78. package/.medusa/server/src/jobs/paypal-webhook-retry.js.map +1 -0
  79. package/.medusa/server/src/modules/paypal/clients/paypal-seller.client.d.ts +15 -0
  80. package/.medusa/server/src/modules/paypal/clients/paypal-seller.client.d.ts.map +1 -0
  81. package/.medusa/server/src/modules/paypal/clients/paypal-seller.client.js +67 -0
  82. package/.medusa/server/src/modules/paypal/clients/paypal-seller.client.js.map +1 -0
  83. package/.medusa/server/src/modules/paypal/index.d.ts +64 -0
  84. package/.medusa/server/src/modules/paypal/index.d.ts.map +1 -0
  85. package/.medusa/server/src/modules/paypal/index.js +13 -0
  86. package/.medusa/server/src/modules/paypal/index.js.map +1 -0
  87. package/.medusa/server/src/modules/paypal/migrations/20260115120000_create_paypal_connection.d.ts +6 -0
  88. package/.medusa/server/src/modules/paypal/migrations/20260115120000_create_paypal_connection.d.ts.map +1 -0
  89. package/.medusa/server/src/modules/paypal/migrations/20260115120000_create_paypal_connection.js +36 -0
  90. package/.medusa/server/src/modules/paypal/migrations/20260115120000_create_paypal_connection.js.map +1 -0
  91. package/.medusa/server/src/modules/paypal/migrations/20260123090000_create_paypal_settings.d.ts +6 -0
  92. package/.medusa/server/src/modules/paypal/migrations/20260123090000_create_paypal_settings.d.ts.map +1 -0
  93. package/.medusa/server/src/modules/paypal/migrations/20260123090000_create_paypal_settings.js +25 -0
  94. package/.medusa/server/src/modules/paypal/migrations/20260123090000_create_paypal_settings.js.map +1 -0
  95. package/.medusa/server/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.d.ts +6 -0
  96. package/.medusa/server/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.d.ts.map +1 -0
  97. package/.medusa/server/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.js +32 -0
  98. package/.medusa/server/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.js.map +1 -0
  99. package/.medusa/server/src/modules/paypal/migrations/20260401090000_create_paypal_metric.d.ts +6 -0
  100. package/.medusa/server/src/modules/paypal/migrations/20260401090000_create_paypal_metric.d.ts.map +1 -0
  101. package/.medusa/server/src/modules/paypal/migrations/20260401090000_create_paypal_metric.js +30 -0
  102. package/.medusa/server/src/modules/paypal/migrations/20260401090000_create_paypal_metric.js.map +1 -0
  103. package/.medusa/server/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.d.ts +6 -0
  104. package/.medusa/server/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.d.ts.map +1 -0
  105. package/.medusa/server/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.js +34 -0
  106. package/.medusa/server/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.js.map +1 -0
  107. package/.medusa/server/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.d.ts +6 -0
  108. package/.medusa/server/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.d.ts.map +1 -0
  109. package/.medusa/server/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.js +28 -0
  110. package/.medusa/server/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.js.map +1 -0
  111. package/.medusa/server/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.d.ts +6 -0
  112. package/.medusa/server/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.d.ts.map +1 -0
  113. package/.medusa/server/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.js +29 -0
  114. package/.medusa/server/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.js.map +1 -0
  115. package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.d.ts +6 -0
  116. package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.d.ts.map +1 -0
  117. package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.js +14 -0
  118. package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.js.map +1 -0
  119. package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.d.ts +6 -0
  120. package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.d.ts.map +1 -0
  121. package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.js +14 -0
  122. package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.js.map +1 -0
  123. package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.d.ts +6 -0
  124. package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.d.ts.map +1 -0
  125. package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.js +14 -0
  126. package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.js.map +1 -0
  127. package/.medusa/server/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.d.ts +6 -0
  128. package/.medusa/server/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.d.ts.map +1 -0
  129. package/.medusa/server/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.js +20 -0
  130. package/.medusa/server/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.js.map +1 -0
  131. package/.medusa/server/src/modules/paypal/models/paypal_connection.d.ts +16 -0
  132. package/.medusa/server/src/modules/paypal/models/paypal_connection.d.ts.map +1 -0
  133. package/.medusa/server/src/modules/paypal/models/paypal_connection.js +19 -0
  134. package/.medusa/server/src/modules/paypal/models/paypal_connection.js.map +1 -0
  135. package/.medusa/server/src/modules/paypal/models/paypal_metric.d.ts +7 -0
  136. package/.medusa/server/src/modules/paypal/models/paypal_metric.d.ts.map +1 -0
  137. package/.medusa/server/src/modules/paypal/models/paypal_metric.js +10 -0
  138. package/.medusa/server/src/modules/paypal/models/paypal_metric.js.map +1 -0
  139. package/.medusa/server/src/modules/paypal/models/paypal_settings.d.ts +6 -0
  140. package/.medusa/server/src/modules/paypal/models/paypal_settings.d.ts.map +1 -0
  141. package/.medusa/server/src/modules/paypal/models/paypal_settings.js +9 -0
  142. package/.medusa/server/src/modules/paypal/models/paypal_settings.js.map +1 -0
  143. package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.d.ts +17 -0
  144. package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.d.ts.map +1 -0
  145. package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.js +20 -0
  146. package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.js.map +1 -0
  147. package/.medusa/server/src/modules/paypal/payment-provider/card-service.d.ts +32 -0
  148. package/.medusa/server/src/modules/paypal/payment-provider/card-service.d.ts.map +1 -0
  149. package/.medusa/server/src/modules/paypal/payment-provider/card-service.js +625 -0
  150. package/.medusa/server/src/modules/paypal/payment-provider/card-service.js.map +1 -0
  151. package/.medusa/server/src/modules/paypal/payment-provider/index.d.ts +6 -0
  152. package/.medusa/server/src/modules/paypal/payment-provider/index.d.ts.map +1 -0
  153. package/.medusa/server/src/modules/paypal/payment-provider/index.js +18 -0
  154. package/.medusa/server/src/modules/paypal/payment-provider/index.js.map +1 -0
  155. package/.medusa/server/src/modules/paypal/payment-provider/service.d.ts +39 -0
  156. package/.medusa/server/src/modules/paypal/payment-provider/service.d.ts.map +1 -0
  157. package/.medusa/server/src/modules/paypal/payment-provider/service.js +869 -0
  158. package/.medusa/server/src/modules/paypal/payment-provider/service.js.map +1 -0
  159. package/.medusa/server/src/modules/paypal/payment-provider/webhook-utils.d.ts +3 -0
  160. package/.medusa/server/src/modules/paypal/payment-provider/webhook-utils.d.ts.map +1 -0
  161. package/.medusa/server/src/modules/paypal/payment-provider/webhook-utils.js +74 -0
  162. package/.medusa/server/src/modules/paypal/payment-provider/webhook-utils.js.map +1 -0
  163. package/.medusa/server/src/modules/paypal/service.d.ts +266 -0
  164. package/.medusa/server/src/modules/paypal/service.d.ts.map +1 -0
  165. package/.medusa/server/src/modules/paypal/service.js +1149 -0
  166. package/.medusa/server/src/modules/paypal/service.js.map +1 -0
  167. package/.medusa/server/src/modules/paypal/types/config.d.ts +12 -0
  168. package/.medusa/server/src/modules/paypal/types/config.d.ts.map +1 -0
  169. package/.medusa/server/src/modules/paypal/types/config.js +24 -0
  170. package/.medusa/server/src/modules/paypal/types/config.js.map +1 -0
  171. package/.medusa/server/src/modules/paypal/utils/amounts.d.ts +3 -0
  172. package/.medusa/server/src/modules/paypal/utils/amounts.d.ts.map +1 -0
  173. package/.medusa/server/src/modules/paypal/utils/amounts.js +40 -0
  174. package/.medusa/server/src/modules/paypal/utils/amounts.js.map +1 -0
  175. package/.medusa/server/src/modules/paypal/utils/currencies.d.ts +19 -0
  176. package/.medusa/server/src/modules/paypal/utils/currencies.d.ts.map +1 -0
  177. package/.medusa/server/src/modules/paypal/utils/currencies.js +69 -0
  178. package/.medusa/server/src/modules/paypal/utils/currencies.js.map +1 -0
  179. package/.medusa/server/src/modules/paypal/utils/paypal-auth.d.ts +10 -0
  180. package/.medusa/server/src/modules/paypal/utils/paypal-auth.d.ts.map +1 -0
  181. package/.medusa/server/src/modules/paypal/utils/paypal-auth.js +30 -0
  182. package/.medusa/server/src/modules/paypal/utils/paypal-auth.js.map +1 -0
  183. package/.medusa/server/src/modules/paypal/utils/provider-ids.d.ts +5 -0
  184. package/.medusa/server/src/modules/paypal/utils/provider-ids.d.ts.map +1 -0
  185. package/.medusa/server/src/modules/paypal/utils/provider-ids.js +16 -0
  186. package/.medusa/server/src/modules/paypal/utils/provider-ids.js.map +1 -0
  187. package/.medusa/server/src/modules/paypal/webhook-processor.d.ts +29 -0
  188. package/.medusa/server/src/modules/paypal/webhook-processor.d.ts.map +1 -0
  189. package/.medusa/server/src/modules/paypal/webhook-processor.js +267 -0
  190. package/.medusa/server/src/modules/paypal/webhook-processor.js.map +1 -0
  191. package/.medusa/server/src/providers/paypal/index.d.ts +5 -0
  192. package/.medusa/server/src/providers/paypal/index.d.ts.map +1 -0
  193. package/.medusa/server/src/providers/paypal/index.js +10 -0
  194. package/.medusa/server/src/providers/paypal/index.js.map +1 -0
  195. package/.medusa/server/src/providers/paypal_card/index.d.ts +5 -0
  196. package/.medusa/server/src/providers/paypal_card/index.d.ts.map +1 -0
  197. package/.medusa/server/src/providers/paypal_card/index.js +10 -0
  198. package/.medusa/server/src/providers/paypal_card/index.js.map +1 -0
  199. package/.medusa/server/src/subscribers/paypal-order-invoice.d.ts +6 -0
  200. package/.medusa/server/src/subscribers/paypal-order-invoice.d.ts.map +1 -0
  201. package/.medusa/server/src/subscribers/paypal-order-invoice.js +124 -0
  202. package/.medusa/server/src/subscribers/paypal-order-invoice.js.map +1 -0
  203. package/LICENSE +21 -0
  204. package/README.md +172 -0
  205. package/package.json +80 -0
  206. package/src/admin/index.ts +7 -0
  207. package/src/admin/routes/settings/paypal/_components/Tabs.tsx +48 -0
  208. package/src/admin/routes/settings/paypal/_components/Toast.tsx +51 -0
  209. package/src/admin/routes/settings/paypal/additional-settings/page.tsx +199 -0
  210. package/src/admin/routes/settings/paypal/advanced-card-payments/page.tsx +183 -0
  211. package/src/admin/routes/settings/paypal/apple-pay/page.tsx +5 -0
  212. package/src/admin/routes/settings/paypal/connection/page.tsx +699 -0
  213. package/src/admin/routes/settings/paypal/google-pay/page.tsx +5 -0
  214. package/src/admin/routes/settings/paypal/page.tsx +13 -0
  215. package/src/admin/routes/settings/paypal/pay-later-messaging/page.tsx +5 -0
  216. package/src/admin/routes/settings/paypal/paypal-settings/page.tsx +351 -0
  217. package/src/api/admin/payment-collections/[id]/payment-sessions/route.ts +24 -0
  218. package/src/api/admin/paypal/disconnect/route.ts +8 -0
  219. package/src/api/admin/paypal/environment/route.ts +25 -0
  220. package/src/api/admin/paypal/onboard-complete/route.ts +34 -0
  221. package/src/api/admin/paypal/onboarding-link/route.ts +45 -0
  222. package/src/api/admin/paypal/onboarding-status/route.ts +17 -0
  223. package/src/api/admin/paypal/save-credentials/route.ts +22 -0
  224. package/src/api/admin/paypal/settings/route.ts +14 -0
  225. package/src/api/admin/paypal/status/route.ts +12 -0
  226. package/src/api/middlewares.ts +14 -0
  227. package/src/api/store/payment-collections/[id]/payment-sessions/route.ts +56 -0
  228. package/src/api/store/paypal/capture-order/route.ts +265 -0
  229. package/src/api/store/paypal/config/route.ts +100 -0
  230. package/src/api/store/paypal/create-order/route.ts +449 -0
  231. package/src/api/store/paypal/settings/route.ts +19 -0
  232. package/src/api/store/paypal/webhook/route.ts +325 -0
  233. package/src/api/store/paypal-complete/route.ts +95 -0
  234. package/src/index.ts +1 -0
  235. package/src/jobs/paypal-webhook-retry.ts +149 -0
  236. package/src/modules/paypal/clients/paypal-seller.client.ts +62 -0
  237. package/src/modules/paypal/index.ts +8 -0
  238. package/src/modules/paypal/migrations/20260115120000_create_paypal_connection.ts +33 -0
  239. package/src/modules/paypal/migrations/20260123090000_create_paypal_settings.ts +22 -0
  240. package/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.ts +29 -0
  241. package/src/modules/paypal/migrations/20260401090000_create_paypal_metric.ts +27 -0
  242. package/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.ts +31 -0
  243. package/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.ts +25 -0
  244. package/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.ts +26 -0
  245. package/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.ts +11 -0
  246. package/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.ts +11 -0
  247. package/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.ts +11 -0
  248. package/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.ts +17 -0
  249. package/src/modules/paypal/models/paypal_connection.ts +23 -0
  250. package/src/modules/paypal/models/paypal_metric.ts +9 -0
  251. package/src/modules/paypal/models/paypal_settings.ts +8 -0
  252. package/src/modules/paypal/models/paypal_webhook_event.ts +19 -0
  253. package/src/modules/paypal/payment-provider/README.md +22 -0
  254. package/src/modules/paypal/payment-provider/card-service.ts +767 -0
  255. package/src/modules/paypal/payment-provider/index.ts +15 -0
  256. package/src/modules/paypal/payment-provider/service.ts +1039 -0
  257. package/src/modules/paypal/payment-provider/webhook-utils.ts +88 -0
  258. package/src/modules/paypal/service.ts +1416 -0
  259. package/src/modules/paypal/types/config.ts +33 -0
  260. package/src/modules/paypal/utils/amounts.ts +41 -0
  261. package/src/modules/paypal/utils/currencies.ts +84 -0
  262. package/src/modules/paypal/utils/paypal-auth.ts +31 -0
  263. package/src/modules/paypal/utils/provider-ids.ts +15 -0
  264. package/src/modules/paypal/webhook-processor.ts +363 -0
  265. package/src/providers/paypal/index.ts +8 -0
  266. package/src/providers/paypal_card/index.ts +8 -0
  267. package/src/subscribers/paypal-order-invoice.ts +171 -0
  268. package/tsconfig.json +31 -0
@@ -0,0 +1,64 @@
1
+ import PayPalModuleService from "./service";
2
+ export declare const PAYPAL_MODULE = "paypal_onboarding";
3
+ declare const _default: import("@medusajs/types").ModuleExports<typeof PayPalModuleService> & {
4
+ linkable: {
5
+ readonly paypalConnection: {
6
+ id: {
7
+ serviceName: "paypal_onboarding";
8
+ field: "paypalConnection";
9
+ linkable: "paypal_connection_id";
10
+ primaryKey: "id";
11
+ };
12
+ toJSON: () => {
13
+ serviceName: "paypal_onboarding";
14
+ field: "paypalConnection";
15
+ linkable: "paypal_connection_id";
16
+ primaryKey: "id";
17
+ };
18
+ };
19
+ readonly paypalMetric: {
20
+ id: {
21
+ serviceName: "paypal_onboarding";
22
+ field: "paypalMetric";
23
+ linkable: "paypal_metric_id";
24
+ primaryKey: "id";
25
+ };
26
+ toJSON: () => {
27
+ serviceName: "paypal_onboarding";
28
+ field: "paypalMetric";
29
+ linkable: "paypal_metric_id";
30
+ primaryKey: "id";
31
+ };
32
+ };
33
+ readonly paypalSettings: {
34
+ id: {
35
+ serviceName: "paypal_onboarding";
36
+ field: "paypalSettings";
37
+ linkable: "paypal_settings_id";
38
+ primaryKey: "id";
39
+ };
40
+ toJSON: () => {
41
+ serviceName: "paypal_onboarding";
42
+ field: "paypalSettings";
43
+ linkable: "paypal_settings_id";
44
+ primaryKey: "id";
45
+ };
46
+ };
47
+ readonly paypalWebhookEvent: {
48
+ id: {
49
+ serviceName: "paypal_onboarding";
50
+ field: "paypalWebhookEvent";
51
+ linkable: "paypal_webhook_event_id";
52
+ primaryKey: "id";
53
+ };
54
+ toJSON: () => {
55
+ serviceName: "paypal_onboarding";
56
+ field: "paypalWebhookEvent";
57
+ linkable: "paypal_webhook_event_id";
58
+ primaryKey: "id";
59
+ };
60
+ };
61
+ };
62
+ };
63
+ export default _default;
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/paypal/index.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,WAAW,CAAA;AAE3C,eAAO,MAAM,aAAa,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,wBAEE"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PAYPAL_MODULE = void 0;
7
+ const utils_1 = require("@medusajs/framework/utils");
8
+ const service_1 = __importDefault(require("./service"));
9
+ exports.PAYPAL_MODULE = "paypal_onboarding";
10
+ exports.default = (0, utils_1.Module)(exports.PAYPAL_MODULE, {
11
+ service: service_1.default,
12
+ });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/paypal/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAkD;AAClD,wDAA2C;AAE9B,QAAA,aAAa,GAAG,mBAAmB,CAAA;AAEhD,kBAAe,IAAA,cAAM,EAAC,qBAAa,EAAE;IACnC,OAAO,EAAE,iBAAmB;CAC7B,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260115120000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20260115120000_create_paypal_connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260115120000_create_paypal_connection.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260115120000_create_paypal_connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260115120000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260115120000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ CREATE TABLE IF NOT EXISTS "paypal_connection" (
9
+ "id" text NOT NULL,
10
+ "environment" text NOT NULL DEFAULT 'sandbox',
11
+ "status" text NOT NULL DEFAULT 'disconnected',
12
+ "shared_id" text NULL,
13
+ "auth_code" text NULL,
14
+ "seller_client_id" text NULL,
15
+ "seller_client_secret" text NULL,
16
+ "app_access_token" text NULL,
17
+ "app_access_token_expires_at" timestamptz NULL,
18
+ "metadata" jsonb NOT NULL DEFAULT '{}'::jsonb,
19
+ "created_at" timestamptz NOT NULL DEFAULT now(),
20
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
21
+ "deleted_at" timestamptz NULL,
22
+ CONSTRAINT "paypal_connection_pkey" PRIMARY KEY ("id")
23
+ );
24
+
25
+ CREATE INDEX IF NOT EXISTS "idx_paypal_connection_deleted_at"
26
+ ON "paypal_connection" ("deleted_at");
27
+ `);
28
+ }
29
+ async down() {
30
+ this.addSql(`
31
+ DROP TABLE IF EXISTS "paypal_connection" CASCADE;
32
+ `);
33
+ }
34
+ }
35
+ exports.Migration20260115120000 = Migration20260115120000;
36
+ //# sourceMappingURL=20260115120000_create_paypal_connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260115120000_create_paypal_connection.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260115120000_create_paypal_connection.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;KAoBX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;KAEX,CAAC,CAAA;IACJ,CAAC;CACF;AA9BD,0DA8BC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260123090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20260123090000_create_paypal_settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260123090000_create_paypal_settings.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260123090000_create_paypal_settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAenB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260123090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260123090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ CREATE TABLE IF NOT EXISTS "paypal_settings" (
9
+ "id" text NOT NULL,
10
+ "data" jsonb NULL,
11
+ "created_at" timestamptz NOT NULL DEFAULT now(),
12
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
13
+ "deleted_at" timestamptz NULL,
14
+ CONSTRAINT "paypal_settings_pkey" PRIMARY KEY ("id")
15
+ );
16
+ CREATE INDEX IF NOT EXISTS "idx_paypal_settings_deleted_at"
17
+ ON "paypal_settings" ("deleted_at");
18
+ `);
19
+ }
20
+ async down() {
21
+ this.addSql(`DROP TABLE IF EXISTS "paypal_settings" CASCADE;`);
22
+ }
23
+ }
24
+ exports.Migration20260123090000 = Migration20260123090000;
25
+ //# sourceMappingURL=20260123090000_create_paypal_settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260123090000_create_paypal_settings.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260123090000_create_paypal_settings.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;KAWX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC,iDAAiD,CAAC,CAAA;IAChE,CAAC;CACF;AAnBD,0DAmBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260201090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20260201090000_create_paypal_webhook_event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260201090000_create_paypal_webhook_event.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260201090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260201090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ CREATE TABLE IF NOT EXISTS "paypal_webhook_event" (
9
+ "id" text NOT NULL,
10
+ "event_id" text NOT NULL,
11
+ "event_type" text NOT NULL,
12
+ "resource_id" text NULL,
13
+ "payload" jsonb NOT NULL DEFAULT '{}'::jsonb,
14
+ "created_at" timestamptz NOT NULL DEFAULT now(),
15
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
16
+ "deleted_at" timestamptz NULL,
17
+ CONSTRAINT "paypal_webhook_event_pkey" PRIMARY KEY ("id"),
18
+ CONSTRAINT "paypal_webhook_event_event_id_unique" UNIQUE ("event_id")
19
+ );
20
+
21
+ CREATE INDEX IF NOT EXISTS "idx_paypal_webhook_event_deleted_at"
22
+ ON "paypal_webhook_event" ("deleted_at");
23
+ `);
24
+ }
25
+ async down() {
26
+ this.addSql(`
27
+ DROP TABLE IF EXISTS "paypal_webhook_event" CASCADE;
28
+ `);
29
+ }
30
+ }
31
+ exports.Migration20260201090000 = Migration20260201090000;
32
+ //# sourceMappingURL=20260201090000_create_paypal_webhook_event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260201090000_create_paypal_webhook_event.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;KAgBX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;KAEX,CAAC,CAAA;IACJ,CAAC;CACF;AA1BD,0DA0BC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260401090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20260401090000_create_paypal_metric.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260401090000_create_paypal_metric.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260401090000_create_paypal_metric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260401090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260401090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ CREATE TABLE IF NOT EXISTS "paypal_metric" (
9
+ "id" text NOT NULL,
10
+ "name" text NOT NULL,
11
+ "data" jsonb NOT NULL DEFAULT '{}'::jsonb,
12
+ "created_at" timestamptz NOT NULL DEFAULT now(),
13
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
14
+ "deleted_at" timestamptz NULL,
15
+ CONSTRAINT "paypal_metric_pkey" PRIMARY KEY ("id"),
16
+ CONSTRAINT "paypal_metric_name_unique" UNIQUE ("name")
17
+ );
18
+
19
+ CREATE INDEX IF NOT EXISTS "idx_paypal_metric_deleted_at"
20
+ ON "paypal_metric" ("deleted_at");
21
+ `);
22
+ }
23
+ async down() {
24
+ this.addSql(`
25
+ DROP TABLE IF EXISTS "paypal_metric" CASCADE;
26
+ `);
27
+ }
28
+ }
29
+ exports.Migration20260401090000 = Migration20260401090000;
30
+ //# sourceMappingURL=20260401090000_create_paypal_metric.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260401090000_create_paypal_metric.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260401090000_create_paypal_metric.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;KAcX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;KAEX,CAAC,CAAA;IACJ,CAAC;CACF;AAxBD,0DAwBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260701090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20260701090000_add_paypal_webhook_event_processing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260701090000_add_paypal_webhook_event_processing.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAcnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAa5B"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260701090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260701090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ ALTER TABLE "paypal_webhook_event"
9
+ ADD COLUMN IF NOT EXISTS "event_version" text NULL,
10
+ ADD COLUMN IF NOT EXISTS "transmission_id" text NULL,
11
+ ADD COLUMN IF NOT EXISTS "transmission_time" timestamptz NULL,
12
+ ADD COLUMN IF NOT EXISTS "status" text NOT NULL DEFAULT 'pending',
13
+ ADD COLUMN IF NOT EXISTS "attempt_count" integer NOT NULL DEFAULT 0,
14
+ ADD COLUMN IF NOT EXISTS "next_retry_at" timestamptz NULL,
15
+ ADD COLUMN IF NOT EXISTS "processed_at" timestamptz NULL,
16
+ ADD COLUMN IF NOT EXISTS "last_error" text NULL;
17
+ `);
18
+ }
19
+ async down() {
20
+ this.addSql(`
21
+ ALTER TABLE "paypal_webhook_event"
22
+ DROP COLUMN IF EXISTS "event_version",
23
+ DROP COLUMN IF EXISTS "transmission_id",
24
+ DROP COLUMN IF EXISTS "transmission_time",
25
+ DROP COLUMN IF EXISTS "status",
26
+ DROP COLUMN IF EXISTS "attempt_count",
27
+ DROP COLUMN IF EXISTS "next_retry_at",
28
+ DROP COLUMN IF EXISTS "processed_at",
29
+ DROP COLUMN IF EXISTS "last_error";
30
+ `);
31
+ }
32
+ }
33
+ exports.Migration20260701090000 = Migration20260701090000;
34
+ //# sourceMappingURL=20260701090000_add_paypal_webhook_event_processing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20260701090000_add_paypal_webhook_event_processing.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;KAUX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;KAUX,CAAC,CAAA;IACJ,CAAC;CACF;AA5BD,0DA4BC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20261101090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20261101090000_remove_paypal_reconciliation_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261101090000_remove_paypal_reconciliation_status.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IASnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAY5B"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20261101090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20261101090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ DELETE FROM "paypal_metric"
9
+ WHERE "name" = 'reconcile_status';
10
+
11
+ DROP TABLE IF EXISTS "paypal_reconciliation_status" CASCADE;
12
+ `);
13
+ }
14
+ async down() {
15
+ this.addSql(`
16
+ CREATE TABLE IF NOT EXISTS "paypal_reconciliation_status" (
17
+ "id" text NOT NULL,
18
+ "status" text NOT NULL,
19
+ "data" jsonb NOT NULL DEFAULT '{}'::jsonb,
20
+ "created_at" timestamptz NOT NULL DEFAULT now(),
21
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
22
+ CONSTRAINT "paypal_reconciliation_status_pkey" PRIMARY KEY ("id")
23
+ );
24
+ `);
25
+ }
26
+ }
27
+ exports.Migration20261101090000 = Migration20261101090000;
28
+ //# sourceMappingURL=20261101090000_remove_paypal_reconciliation_status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261101090000_remove_paypal_reconciliation_status.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;KAKX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;;;;;;;;KASX,CAAC,CAAA;IACJ,CAAC;CACF;AAtBD,0DAsBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20261201090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20261201090000_remove_paypal_audit_log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261201090000_remove_paypal_audit_log.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAMnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB5B"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20261201090000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20261201090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ DROP TABLE IF EXISTS "paypal_audit_log" CASCADE;
9
+ `);
10
+ }
11
+ async down() {
12
+ this.addSql(`
13
+ CREATE TABLE IF NOT EXISTS "paypal_audit_log" (
14
+ "id" text NOT NULL,
15
+ "event_type" text NOT NULL,
16
+ "metadata" jsonb NULL,
17
+ "created_at" timestamptz NOT NULL DEFAULT now(),
18
+ "updated_at" timestamptz NOT NULL DEFAULT now(),
19
+ "deleted_at" timestamptz NULL,
20
+ CONSTRAINT "paypal_audit_log_pkey" PRIMARY KEY ("id")
21
+ );
22
+
23
+ CREATE INDEX IF NOT EXISTS "idx_paypal_audit_log_deleted_at"
24
+ ON "paypal_audit_log" ("deleted_at");
25
+ `);
26
+ }
27
+ }
28
+ exports.Migration20261201090000 = Migration20261201090000;
29
+ //# sourceMappingURL=20261201090000_remove_paypal_audit_log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261201090000_remove_paypal_audit_log.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;KAEX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;KAaX,CAAC,CAAA;IACJ,CAAC;CACF;AAvBD,0DAuBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@mikro-orm/migrations";
2
+ export declare class Migration20270101090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20270101090000_set_paypal_environment_default_live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270101090000_set_paypal_environment_default_live.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20270101090000 = void 0;
4
+ const migrations_1 = require("@mikro-orm/migrations");
5
+ class Migration20270101090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`alter table if exists "paypal_connection" alter column "environment" set default 'live';`);
8
+ }
9
+ async down() {
10
+ this.addSql(`alter table if exists "paypal_connection" alter column "environment" set default 'sandbox';`);
11
+ }
12
+ }
13
+ exports.Migration20270101090000 = Migration20270101090000;
14
+ //# sourceMappingURL=20270101090000_set_paypal_environment_default_live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270101090000_set_paypal_environment_default_live.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,0FAA0F,CAAC,CAAA;IACzG,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,6FAA6F,CAAC,CAAA;IAC5G,CAAC;CACF;AARD,0DAQC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@mikro-orm/migrations";
2
+ export declare class Migration20270102090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20270102090000_add_paypal_seller_email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270102090000_add_paypal_seller_email.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20270102090000 = void 0;
4
+ const migrations_1 = require("@mikro-orm/migrations");
5
+ class Migration20270102090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`alter table if exists "paypal_connection" add column if not exists "seller_email" text null;`);
8
+ }
9
+ async down() {
10
+ this.addSql(`alter table if exists "paypal_connection" drop column if exists "seller_email";`);
11
+ }
12
+ }
13
+ exports.Migration20270102090000 = Migration20270102090000;
14
+ //# sourceMappingURL=20270102090000_add_paypal_seller_email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270102090000_add_paypal_seller_email.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,8FAA8F,CAAC,CAAA;IAC7G,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,iFAAiF,CAAC,CAAA;IAChG,CAAC;CACF;AARD,0DAQC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@mikro-orm/migrations";
2
+ export declare class Migration20270103090000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20270103090000_add_paypal_seller_merchant_id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270103090000_add_paypal_seller_merchant_id.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20270103090000 = void 0;
4
+ const migrations_1 = require("@mikro-orm/migrations");
5
+ class Migration20270103090000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`alter table if exists "paypal_connection" add column if not exists "seller_merchant_id" text null;`);
8
+ }
9
+ async down() {
10
+ this.addSql(`alter table if exists "paypal_connection" drop column if exists "seller_merchant_id";`);
11
+ }
12
+ }
13
+ exports.Migration20270103090000 = Migration20270103090000;
14
+ //# sourceMappingURL=20270103090000_add_paypal_seller_merchant_id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270103090000_add_paypal_seller_merchant_id.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,oGAAoG,CAAC,CAAA;IACnH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,uFAAuF,CAAC,CAAA;IACtG,CAAC;CACF;AARD,0DAQC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20270201000000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=20270201000000_add_webhook_dead_letter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270201000000_add_webhook_dead_letter.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAQnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20270201000000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20270201000000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ CREATE INDEX IF NOT EXISTS "idx_paypal_webhook_event_status_retry"
9
+ ON "paypal_webhook_event" ("status", "next_retry_at")
10
+ WHERE "status" = 'failed';
11
+ `);
12
+ }
13
+ async down() {
14
+ this.addSql(`
15
+ DROP INDEX IF EXISTS "idx_paypal_webhook_event_status_retry";
16
+ `);
17
+ }
18
+ }
19
+ exports.Migration20270201000000 = Migration20270201000000;
20
+ //# sourceMappingURL=20270201000000_add_webhook_dead_letter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20270201000000_add_webhook_dead_letter.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;KAIX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;KAEX,CAAC,CAAA;IACJ,CAAC;CACF;AAdD,0DAcC"}
@@ -0,0 +1,16 @@
1
+ declare const PayPalConnection: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
+ environment: import("@medusajs/framework/utils").TextProperty;
4
+ status: import("@medusajs/framework/utils").TextProperty;
5
+ shared_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
6
+ auth_code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
7
+ seller_client_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
8
+ seller_client_secret: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
9
+ seller_merchant_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
10
+ seller_email: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
11
+ app_access_token: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
12
+ app_access_token_expires_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
13
+ metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
14
+ }>, "paypal_connection">;
15
+ export default PayPalConnection;
16
+ //# sourceMappingURL=paypal_connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paypal_connection.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/models/paypal_connection.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;wBAkBpB,CAAA;AAEF,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@medusajs/framework/utils");
4
+ const PayPalConnection = utils_1.model.define("paypal_connection", {
5
+ id: utils_1.model.id().primaryKey(),
6
+ environment: utils_1.model.text(),
7
+ status: utils_1.model.text(),
8
+ shared_id: utils_1.model.text().nullable(),
9
+ auth_code: utils_1.model.text().nullable(),
10
+ seller_client_id: utils_1.model.text().nullable(),
11
+ seller_client_secret: utils_1.model.text().nullable(),
12
+ seller_merchant_id: utils_1.model.text().nullable(),
13
+ seller_email: utils_1.model.text().nullable(),
14
+ app_access_token: utils_1.model.text().nullable(),
15
+ app_access_token_expires_at: utils_1.model.dateTime().nullable(),
16
+ metadata: utils_1.model.json().nullable(),
17
+ });
18
+ exports.default = PayPalConnection;
19
+ //# sourceMappingURL=paypal_connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paypal_connection.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/models/paypal_connection.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,MAAM,gBAAgB,GAAG,aAAK,CAAC,MAAM,CAAC,mBAAmB,EAAE;IACzD,EAAE,EAAE,aAAK,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE;IAE3B,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE;IACzB,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE;IAEpB,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAElC,gBAAgB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACzC,oBAAoB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7C,kBAAkB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC3C,YAAY,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAErC,gBAAgB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACzC,2BAA2B,EAAE,aAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAExD,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA;AAEF,kBAAe,gBAAgB,CAAA"}
@@ -0,0 +1,7 @@
1
+ declare const PayPalMetric: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
+ name: import("@medusajs/framework/utils").TextProperty;
4
+ data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
5
+ }>, "paypal_metric">;
6
+ export default PayPalMetric;
7
+ //# sourceMappingURL=paypal_metric.d.ts.map