@lunora/payment 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (43) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +5 -2
  3. package/dist/index.d.mts +266 -523
  4. package/dist/index.d.ts +266 -523
  5. package/dist/index.mjs +11 -13
  6. package/dist/packem_shared/{LunoraPaymentError-B3hEzXSs.mjs → LunoraPaymentError-BeQlhkZj.mjs} +4 -7
  7. package/dist/packem_shared/adapter.d-CMjjkTGB.d.mts +427 -0
  8. package/dist/packem_shared/adapter.d-CMjjkTGB.d.ts +427 -0
  9. package/dist/packem_shared/{addMoney-bCcs1nyw.mjs → addMoney-jSh_7TfF.mjs} +1 -1
  10. package/dist/packem_shared/{applyWebhookAction-DpAqf3Lw.mjs → applyWebhookAction-CLAx4svt.mjs} +1 -1
  11. package/dist/packem_shared/{constantTimeEqual-CfY0jYcL.mjs → constantTimeEqual-BQjoW85H.mjs} +14 -38
  12. package/dist/packem_shared/{createAdapterRegistry-BuDHFCBc.mjs → createAdapterRegistry-Ds7bx_TK.mjs} +1 -1
  13. package/dist/packem_shared/{createDatabasePaymentStore-bYB_HUE6.mjs → createDatabasePaymentStore-C0NUCj1H.mjs} +1 -1
  14. package/dist/packem_shared/{createPayment-BccfPGyw.mjs → createPayment-CKQAznOL.mjs} +26 -16
  15. package/dist/packem_shared/idempotencyKey-BzaHGdHD.mjs +9 -0
  16. package/dist/packem_shared/json-D0Cb5aMv.mjs +29 -0
  17. package/dist/packem_shared/{lunoraDatabaseToPaymentDatabase-RlKX3Kcd.mjs → lunoraDatabaseToPaymentDatabase-DTsgPvfO.mjs} +2 -2
  18. package/dist/packem_shared/not-supported-C0onRyia.mjs +7 -0
  19. package/dist/packem_shared/paymentTables-D4TbhaIk.mjs +59 -0
  20. package/dist/packem_shared/{reconcile-CI1ukJF9.mjs → reconcile-qE3ERi3D.mjs} +14 -2
  21. package/dist/packem_shared/subscription-event-CwEsWRCK.mjs +17 -0
  22. package/dist/providers/autumn-features.d.mts +129 -0
  23. package/dist/providers/autumn-features.d.ts +129 -0
  24. package/dist/providers/autumn-features.mjs +95 -0
  25. package/dist/providers/autumn.d.mts +28 -0
  26. package/dist/providers/autumn.d.ts +28 -0
  27. package/dist/providers/autumn.mjs +275 -0
  28. package/dist/providers/creem.d.mts +26 -0
  29. package/dist/providers/creem.d.ts +26 -0
  30. package/dist/providers/creem.mjs +236 -0
  31. package/dist/providers/dodopayments.d.mts +30 -0
  32. package/dist/providers/dodopayments.d.ts +30 -0
  33. package/dist/providers/dodopayments.mjs +259 -0
  34. package/dist/providers/polar.d.mts +31 -0
  35. package/dist/providers/polar.d.ts +31 -0
  36. package/dist/{packem_shared/createPolarAdapter-BJtVGSlF.mjs → providers/polar.mjs} +63 -49
  37. package/dist/providers/stripe.d.mts +32 -0
  38. package/dist/providers/stripe.d.ts +32 -0
  39. package/dist/{packem_shared/createStripeAdapter-D40MVBXg.mjs → providers/stripe.mjs} +56 -55
  40. package/package.json +46 -5
  41. package/dist/packem_shared/idempotencyKey-BFzDCA7g.mjs +0 -3
  42. package/dist/packem_shared/json-Db337f36.mjs +0 -6
  43. package/dist/packem_shared/paymentTables-DccHwWr_.mjs +0 -127
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
12
12
 
13
+ > **Experimental** — this package is outside the Lunora 1.0 stability promise: its API may change in any release, without a major version bump.
14
+
13
15
  <br />
14
16
 
15
17
  <div align="center">
@@ -46,14 +48,15 @@ Part of the [Lunora](https://github.com/anolilab/lunora) framework — a type-sa
46
48
  pnpm add @lunora/payment stripe
47
49
  ```
48
50
 
49
- `stripe` is an optional peer dependency — install only the provider SDK you use; the adapter takes the client by injection.
51
+ `stripe` is an optional peer dependency — install only the provider SDK you use; the adapter takes the client by injection. The same holds for the other providers: `createPolarAdapter` (Polar), `createAutumnAdapter` ([Autumn](https://useautumn.com)), `createDodoPaymentsAdapter` ([Dodo Payments](https://dodopayments.com)), and `createCreemAdapter` ([Creem](https://creem.io)) take a structural client too, so no provider SDK is a hard dependency of this package. Additional providers plug in via `PaymentAdapter`.
50
52
 
51
53
  ## Usage
52
54
 
53
55
  Build a facade from an adapter and a store, then start a hosted checkout:
54
56
 
55
57
  ```ts
56
- import { createPayment, createStripeAdapter, MemoryPaymentStore } from "@lunora/payment";
58
+ import { createPayment, MemoryPaymentStore } from "@lunora/payment";
59
+ import { createStripeAdapter } from "@lunora/payment/stripe";
57
60
  import Stripe from "stripe";
58
61
 
59
62
  const payment = createPayment({