@lunora/payment 1.0.0-alpha.1 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +10 -10
- package/dist/packem_shared/{applyWebhookAction-6NObmIh4.mjs → applyWebhookAction-DpAqf3Lw.mjs} +2 -2
- package/dist/packem_shared/{createDatabasePaymentStore-C0hXSKmj.mjs → createDatabasePaymentStore-bYB_HUE6.mjs} +1 -1
- package/dist/packem_shared/{createPayment-DG97pe-f.mjs → createPayment-BccfPGyw.mjs} +2 -2
- package/dist/packem_shared/{createPolarAdapter-fRZ9Yke0.mjs → createPolarAdapter-BJtVGSlF.mjs} +1 -1
- package/dist/packem_shared/{createStripeAdapter-C7xpOpsD.mjs → createStripeAdapter-D40MVBXg.mjs} +1 -1
- package/dist/packem_shared/{lunoraDatabaseToPaymentDatabase-D_ViFvZV.mjs → lunoraDatabaseToPaymentDatabase-RlKX3Kcd.mjs} +2 -2
- package/dist/packem_shared/{reconcile-BhJCfqcT.mjs → reconcile-CI1ukJF9.mjs} +1 -1
- package/package.json +2 -2
- /package/dist/packem_shared/{canTransitionPayment-DrxV0clv.mjs → PAYMENT_TERMINAL_STATES-DrxV0clv.mjs} +0 -0
- /package/dist/packem_shared/{isZeroDecimalCurrency-bCcs1nyw.mjs → addMoney-bCcs1nyw.mjs} +0 -0
- /package/dist/packem_shared/{usagePeriodStart-CzZGXPoZ.mjs → entitlementsForReference-CzZGXPoZ.mjs} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { createAdapterRegistry } from './packem_shared/createAdapterRegistry-BuDHFCBc.mjs';
|
|
2
|
-
export { lunoraDatabaseToPaymentDatabase, paymentsFromContext } from './packem_shared/lunoraDatabaseToPaymentDatabase-
|
|
3
|
-
export { createPayment } from './packem_shared/createPayment-
|
|
4
|
-
export { createDatabasePaymentStore } from './packem_shared/createDatabasePaymentStore-
|
|
5
|
-
export { entitlementsForReference, featureNames, hasActivePrice, resolveEntitlements, usagePeriodStart } from './packem_shared/
|
|
2
|
+
export { lunoraDatabaseToPaymentDatabase, paymentsFromContext } from './packem_shared/lunoraDatabaseToPaymentDatabase-RlKX3Kcd.mjs';
|
|
3
|
+
export { createPayment } from './packem_shared/createPayment-BccfPGyw.mjs';
|
|
4
|
+
export { createDatabasePaymentStore } from './packem_shared/createDatabasePaymentStore-bYB_HUE6.mjs';
|
|
5
|
+
export { entitlementsForReference, featureNames, hasActivePrice, resolveEntitlements, usagePeriodStart } from './packem_shared/entitlementsForReference-CzZGXPoZ.mjs';
|
|
6
6
|
export { LunoraPaymentError } from './packem_shared/LunoraPaymentError-B3hEzXSs.mjs';
|
|
7
7
|
export { default as idempotencyKey } from './packem_shared/idempotencyKey-BFzDCA7g.mjs';
|
|
8
|
-
export { addMoney, allocateMoney, compareMoney, formatMoney, fromMoneyJSON, isZeroDecimalCurrency, isZeroMoney, money, subtractMoney, toMoneyJSON, zeroMoney } from './packem_shared/
|
|
9
|
-
export { createPolarAdapter } from './packem_shared/createPolarAdapter-
|
|
10
|
-
export { createStripeAdapter } from './packem_shared/createStripeAdapter-
|
|
11
|
-
export { reconcile } from './packem_shared/reconcile-
|
|
8
|
+
export { addMoney, allocateMoney, compareMoney, formatMoney, fromMoneyJSON, isZeroDecimalCurrency, isZeroMoney, money, subtractMoney, toMoneyJSON, zeroMoney } from './packem_shared/addMoney-bCcs1nyw.mjs';
|
|
9
|
+
export { createPolarAdapter } from './packem_shared/createPolarAdapter-BJtVGSlF.mjs';
|
|
10
|
+
export { createStripeAdapter } from './packem_shared/createStripeAdapter-D40MVBXg.mjs';
|
|
11
|
+
export { reconcile } from './packem_shared/reconcile-CI1ukJF9.mjs';
|
|
12
12
|
export { default as paymentTables } from './packem_shared/paymentTables-DccHwWr_.mjs';
|
|
13
|
-
export { PAYMENT_TERMINAL_STATES, SUBSCRIPTION_TERMINAL_STATES, canTransitionPayment, canTransitionSubscription, nextPaymentState, nextSubscriptionState } from './packem_shared/
|
|
13
|
+
export { PAYMENT_TERMINAL_STATES, SUBSCRIPTION_TERMINAL_STATES, canTransitionPayment, canTransitionSubscription, nextPaymentState, nextSubscriptionState } from './packem_shared/PAYMENT_TERMINAL_STATES-DrxV0clv.mjs';
|
|
14
14
|
export { MemoryPaymentStore } from './packem_shared/MemoryPaymentStore-DvgdWa3C.mjs';
|
|
15
|
-
export { default as applyWebhookAction } from './packem_shared/applyWebhookAction-
|
|
15
|
+
export { default as applyWebhookAction } from './packem_shared/applyWebhookAction-DpAqf3Lw.mjs';
|
|
16
16
|
export { constantTimeEqual, hmacSha256Hex, parseStripeSignatureHeader, verifyStandardWebhook, verifyStripeSignature } from './packem_shared/constantTimeEqual-CfY0jYcL.mjs';
|
package/dist/packem_shared/{applyWebhookAction-6NObmIh4.mjs → applyWebhookAction-DpAqf3Lw.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { compareMoney, zeroMoney, addMoney } from './
|
|
1
|
+
import { compareMoney, zeroMoney, addMoney } from './addMoney-bCcs1nyw.mjs';
|
|
2
2
|
import { n as notifyObserver } from './observability-CvhJ205g.mjs';
|
|
3
|
-
import { nextPaymentState, nextSubscriptionState } from './
|
|
3
|
+
import { nextPaymentState, nextSubscriptionState } from './PAYMENT_TERMINAL_STATES-DrxV0clv.mjs';
|
|
4
4
|
|
|
5
5
|
const PAYMENT_ACTION_BY_TYPE = {
|
|
6
6
|
"payment.authorized": "authorize",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { money } from './
|
|
1
|
+
import { money } from './addMoney-bCcs1nyw.mjs';
|
|
2
2
|
|
|
3
3
|
const readString = (row, key) => typeof row[key] === "string" ? row[key] : "";
|
|
4
4
|
const readOptionalString = (row, key) => typeof row[key] === "string" ? row[key] : void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { usagePeriodStart, resolveEntitlements, featureNames, hasActivePrice } from './
|
|
1
|
+
import { usagePeriodStart, resolveEntitlements, featureNames, hasActivePrice } from './entitlementsForReference-CzZGXPoZ.mjs';
|
|
2
2
|
import { LunoraPaymentError } from './LunoraPaymentError-B3hEzXSs.mjs';
|
|
3
3
|
import idempotencyKey from './idempotencyKey-BFzDCA7g.mjs';
|
|
4
4
|
import { n as notifyObserver } from './observability-CvhJ205g.mjs';
|
|
5
|
-
import applyWebhookAction from './applyWebhookAction-
|
|
5
|
+
import applyWebhookAction from './applyWebhookAction-DpAqf3Lw.mjs';
|
|
6
6
|
|
|
7
7
|
const jsonResponse = (body, status) => Response.json(body, { headers: { "content-type": "application/json" }, status });
|
|
8
8
|
const stripReferenceId = (metadata) => metadata && "referenceId" in metadata ? Object.fromEntries(Object.entries(metadata).filter(([key]) => key !== "referenceId")) : metadata;
|
package/dist/packem_shared/{createPolarAdapter-fRZ9Yke0.mjs → createPolarAdapter-BJtVGSlF.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LunoraPaymentError } from './LunoraPaymentError-B3hEzXSs.mjs';
|
|
2
2
|
import { a as asRecord, r as readString, b as readBoolean, c as readNumber } from './json-Db337f36.mjs';
|
|
3
|
-
import { money, zeroMoney } from './
|
|
3
|
+
import { money, zeroMoney } from './addMoney-bCcs1nyw.mjs';
|
|
4
4
|
import { verifyStandardWebhook } from './constantTimeEqual-CfY0jYcL.mjs';
|
|
5
5
|
|
|
6
6
|
const PAYMENT_STATE_BY_POLAR_ORDER_STATUS = {
|
package/dist/packem_shared/{createStripeAdapter-C7xpOpsD.mjs → createStripeAdapter-D40MVBXg.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import idempotencyKey from './idempotencyKey-BFzDCA7g.mjs';
|
|
2
2
|
import { a as asRecord, r as readString, c as readNumber, b as readBoolean } from './json-Db337f36.mjs';
|
|
3
|
-
import { compareMoney, money, zeroMoney } from './
|
|
3
|
+
import { compareMoney, money, zeroMoney } from './addMoney-bCcs1nyw.mjs';
|
|
4
4
|
import { verifyStripeSignature } from './constantTimeEqual-CfY0jYcL.mjs';
|
|
5
5
|
|
|
6
6
|
const PAYMENT_STATE_BY_STRIPE_STATUS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createPayment } from './createPayment-
|
|
2
|
-
import { createDatabasePaymentStore } from './createDatabasePaymentStore-
|
|
1
|
+
import { createPayment } from './createPayment-BccfPGyw.mjs';
|
|
2
|
+
import { createDatabasePaymentStore } from './createDatabasePaymentStore-bYB_HUE6.mjs';
|
|
3
3
|
|
|
4
4
|
const lunoraDatabaseToPaymentDatabase = (database) => {
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { compareMoney } from './
|
|
1
|
+
import { compareMoney } from './addMoney-bCcs1nyw.mjs';
|
|
2
2
|
import { n as notifyObserver } from './observability-CvhJ205g.mjs';
|
|
3
3
|
|
|
4
4
|
const sameCurrencyAmount = (a, b) => a.currency === b.currency && compareMoney(a, b) === 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/payment",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"description": "Provider-agnostic payments for Lunora: Stripe-first adapter, webhook sync, and subscription/payment state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"billing",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@lunora/server": "1.0.0-alpha.
|
|
50
|
+
"@lunora/server": "1.0.0-alpha.2",
|
|
51
51
|
"@lunora/values": "1.0.0-alpha.1",
|
|
52
52
|
"dinero.js": "2.0.2"
|
|
53
53
|
},
|
|
File without changes
|
|
File without changes
|
/package/dist/packem_shared/{usagePeriodStart-CzZGXPoZ.mjs → entitlementsForReference-CzZGXPoZ.mjs}
RENAMED
|
File without changes
|