@owlmeans/payment 0.1.18-rc.8 → 0.1.18
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/README.md +95 -57
- package/agent-meta/manifest.json +10 -3
- package/agent-meta/skills/entitlements/SKILL.md +159 -0
- package/agent-meta/skills/payment/SKILL.md +491 -28
- package/build/advertise.d.ts +2 -0
- package/build/advertise.d.ts.map +1 -0
- package/build/advertise.js +10 -0
- package/build/advertise.js.map +1 -0
- package/build/checkout/consts.d.ts +2 -0
- package/build/checkout/consts.d.ts.map +1 -0
- package/build/checkout/consts.js +2 -0
- package/build/checkout/consts.js.map +1 -0
- package/build/checkout/index.d.ts +6 -0
- package/build/checkout/index.d.ts.map +1 -0
- package/build/checkout/index.js +4 -0
- package/build/checkout/index.js.map +1 -0
- package/build/checkout/narrow/types.d.ts +25 -0
- package/build/checkout/narrow/types.d.ts.map +1 -0
- package/build/checkout/narrow/types.js +2 -0
- package/build/checkout/narrow/types.js.map +1 -0
- package/build/checkout/narrow.d.ts +8 -0
- package/build/checkout/narrow.d.ts.map +1 -0
- package/build/checkout/narrow.js +47 -0
- package/build/checkout/narrow.js.map +1 -0
- package/build/checkout/protocols.d.ts +8 -0
- package/build/checkout/protocols.d.ts.map +1 -0
- package/build/checkout/protocols.js +28 -0
- package/build/checkout/protocols.js.map +1 -0
- package/build/checkout/types.d.ts +29 -0
- package/build/checkout/types.d.ts.map +1 -0
- package/build/checkout/types.js +2 -0
- package/build/checkout/types.js.map +1 -0
- package/build/consts.d.ts +242 -25
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +377 -24
- package/build/consts.js.map +1 -1
- package/build/consts.local.d.ts +20 -0
- package/build/consts.local.d.ts.map +1 -0
- package/build/consts.local.js +23 -0
- package/build/consts.local.js.map +1 -0
- package/build/consumer/cancel.d.ts +11 -0
- package/build/consumer/cancel.d.ts.map +1 -0
- package/build/consumer/cancel.js +33 -0
- package/build/consumer/cancel.js.map +1 -0
- package/build/consumer/consts.d.ts +20 -0
- package/build/consumer/consts.d.ts.map +1 -0
- package/build/consumer/consts.js +39 -0
- package/build/consumer/consts.js.map +1 -0
- package/build/consumer/consts.local.d.ts +7 -0
- package/build/consumer/consts.local.d.ts.map +1 -0
- package/build/consumer/consts.local.js +13 -0
- package/build/consumer/consts.local.js.map +1 -0
- package/build/consumer/copy/types.d.ts +56 -0
- package/build/consumer/copy/types.d.ts.map +1 -0
- package/build/consumer/copy/types.js +2 -0
- package/build/consumer/copy/types.js.map +1 -0
- package/build/consumer/copy.d.ts +22 -0
- package/build/consumer/copy.d.ts.map +1 -0
- package/build/consumer/copy.js +87 -0
- package/build/consumer/copy.js.map +1 -0
- package/build/consumer/deadline/types.d.ts +30 -0
- package/build/consumer/deadline/types.d.ts.map +1 -0
- package/build/consumer/deadline/types.js +2 -0
- package/build/consumer/deadline/types.js.map +1 -0
- package/build/consumer/deadline.d.ts +12 -0
- package/build/consumer/deadline.d.ts.map +1 -0
- package/build/consumer/deadline.js +44 -0
- package/build/consumer/deadline.js.map +1 -0
- package/build/consumer/fifo/types.d.ts +17 -0
- package/build/consumer/fifo/types.d.ts.map +1 -0
- package/build/consumer/fifo/types.js +2 -0
- package/build/consumer/fifo/types.js.map +1 -0
- package/build/consumer/fifo.d.ts +4 -0
- package/build/consumer/fifo.d.ts.map +1 -0
- package/build/consumer/fifo.js +34 -0
- package/build/consumer/fifo.js.map +1 -0
- package/build/consumer/index.d.ts +18 -0
- package/build/consumer/index.d.ts.map +1 -0
- package/build/consumer/index.js +11 -0
- package/build/consumer/index.js.map +1 -0
- package/build/consumer/policy/types.d.ts +20 -0
- package/build/consumer/policy/types.d.ts.map +1 -0
- package/build/consumer/policy/types.js +2 -0
- package/build/consumer/policy/types.js.map +1 -0
- package/build/consumer/policy.d.ts +17 -0
- package/build/consumer/policy.d.ts.map +1 -0
- package/build/consumer/policy.js +91 -0
- package/build/consumer/policy.js.map +1 -0
- package/build/consumer/protocols.d.ts +20 -0
- package/build/consumer/protocols.d.ts.map +1 -0
- package/build/consumer/protocols.js +70 -0
- package/build/consumer/protocols.js.map +1 -0
- package/build/consumer/refund/types.d.ts +27 -0
- package/build/consumer/refund/types.d.ts.map +1 -0
- package/build/consumer/refund/types.js +2 -0
- package/build/consumer/refund/types.js.map +1 -0
- package/build/consumer/refund.d.ts +9 -0
- package/build/consumer/refund.d.ts.map +1 -0
- package/build/consumer/refund.js +112 -0
- package/build/consumer/refund.js.map +1 -0
- package/build/consumer/refusal.d.ts +10 -0
- package/build/consumer/refusal.d.ts.map +1 -0
- package/build/consumer/refusal.js +35 -0
- package/build/consumer/refusal.js.map +1 -0
- package/build/consumer/revive/types.d.ts +19 -0
- package/build/consumer/revive/types.d.ts.map +1 -0
- package/build/consumer/revive/types.js +2 -0
- package/build/consumer/revive/types.js.map +1 -0
- package/build/consumer/revive.d.ts +13 -0
- package/build/consumer/revive.d.ts.map +1 -0
- package/build/consumer/revive.js +43 -0
- package/build/consumer/revive.js.map +1 -0
- package/build/consumer/types.d.ts +196 -0
- package/build/consumer/types.d.ts.map +1 -0
- package/build/consumer/types.js +2 -0
- package/build/consumer/types.js.map +1 -0
- package/build/consumer/types.local.d.ts +11 -0
- package/build/consumer/types.local.d.ts.map +1 -0
- package/build/consumer/types.local.js +2 -0
- package/build/consumer/types.local.js.map +1 -0
- package/build/countries.d.ts +3 -0
- package/build/countries.d.ts.map +1 -0
- package/build/countries.js +4 -0
- package/build/countries.js.map +1 -0
- package/build/entitled.d.ts +14 -0
- package/build/entitled.d.ts.map +1 -0
- package/build/entitled.js +17 -0
- package/build/entitled.js.map +1 -0
- package/build/entitlement/types.d.ts +29 -0
- package/build/entitlement/types.d.ts.map +1 -0
- package/build/entitlement/types.js +2 -0
- package/build/entitlement/types.js.map +1 -0
- package/build/entitlement.d.ts +12 -0
- package/build/entitlement.d.ts.map +1 -0
- package/build/entitlement.js +64 -0
- package/build/entitlement.js.map +1 -0
- package/build/errors.d.ts +189 -0
- package/build/errors.d.ts.map +1 -1
- package/build/errors.js +361 -0
- package/build/errors.js.map +1 -1
- package/build/estimate/types.d.ts +34 -0
- package/build/estimate/types.d.ts.map +1 -0
- package/build/estimate/types.js +2 -0
- package/build/estimate/types.js.map +1 -0
- package/build/estimate.d.ts +11 -0
- package/build/estimate.d.ts.map +1 -0
- package/build/estimate.js +76 -0
- package/build/estimate.js.map +1 -0
- package/build/i18n/consumer-rights/be.json +131 -0
- package/build/i18n/consumer-rights/de.json +131 -0
- package/build/i18n/consumer-rights/en.json +131 -0
- package/build/i18n/consumer-rights/es.json +131 -0
- package/build/i18n/consumer-rights/fr.json +131 -0
- package/build/i18n/consumer-rights/pl.json +131 -0
- package/build/i18n/consumer-rights/ru.json +131 -0
- package/build/i18n/consumer-rights/uk.json +131 -0
- package/build/i18n/errors/be.json +30 -0
- package/build/i18n/errors/de.json +30 -0
- package/build/i18n/errors/en.json +30 -0
- package/build/i18n/errors/es.json +30 -0
- package/build/i18n/errors/fr.json +30 -0
- package/build/i18n/errors/pl.json +30 -0
- package/build/i18n/errors/ru.json +30 -0
- package/build/i18n/errors/uk.json +30 -0
- package/build/i18n/fr.json +39 -0
- package/build/i18n.js +53 -8
- package/build/i18n.js.map +1 -1
- package/build/index.d.ts +19 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12 -1
- package/build/index.js.map +1 -1
- package/build/limit/types.d.ts +44 -0
- package/build/limit/types.d.ts.map +1 -0
- package/build/limit/types.js +2 -0
- package/build/limit/types.js.map +1 -0
- package/build/limit.d.ts +23 -0
- package/build/limit.d.ts.map +1 -0
- package/build/limit.js +97 -0
- package/build/limit.js.map +1 -0
- package/build/model/checkout.d.ts +2 -3
- package/build/model/checkout.d.ts.map +1 -1
- package/build/model/checkout.js +12 -7
- package/build/model/checkout.js.map +1 -1
- package/build/model/consts.d.ts +15 -0
- package/build/model/consts.d.ts.map +1 -0
- package/build/model/consts.js +193 -0
- package/build/model/consts.js.map +1 -0
- package/build/model/consts.local.d.ts +35 -0
- package/build/model/consts.local.d.ts.map +1 -0
- package/build/model/consts.local.js +65 -0
- package/build/model/consts.local.js.map +1 -0
- package/build/model/consumer.d.ts +23 -0
- package/build/model/consumer.d.ts.map +1 -0
- package/build/model/consumer.js +272 -0
- package/build/model/consumer.js.map +1 -0
- package/build/model/estimate.d.ts +5 -0
- package/build/model/estimate.d.ts.map +1 -0
- package/build/model/estimate.js +69 -0
- package/build/model/estimate.js.map +1 -0
- package/build/model/index.d.ts +7 -2
- package/build/model/index.d.ts.map +1 -1
- package/build/model/index.js +7 -2
- package/build/model/index.js.map +1 -1
- package/build/model/limit.d.ts +7 -0
- package/build/model/limit.d.ts.map +1 -0
- package/build/model/limit.js +32 -0
- package/build/model/limit.js.map +1 -0
- package/build/model/plan.d.ts.map +1 -1
- package/build/model/plan.js +24 -11
- package/build/model/plan.js.map +1 -1
- package/build/model/portal.d.ts +4 -0
- package/build/model/portal.d.ts.map +1 -0
- package/build/model/portal.js +22 -0
- package/build/model/portal.js.map +1 -0
- package/build/model/pricing.d.ts +4 -0
- package/build/model/pricing.d.ts.map +1 -0
- package/build/model/pricing.js +31 -0
- package/build/model/pricing.js.map +1 -0
- package/build/model/view.d.ts +3 -0
- package/build/model/view.d.ts.map +1 -0
- package/build/model/view.js +15 -0
- package/build/model/view.js.map +1 -0
- package/build/pricing/types.d.ts +13 -0
- package/build/pricing/types.d.ts.map +1 -0
- package/build/pricing/types.js +2 -0
- package/build/pricing/types.js.map +1 -0
- package/build/pricing.d.ts +13 -0
- package/build/pricing.d.ts.map +1 -0
- package/build/pricing.js +74 -0
- package/build/pricing.js.map +1 -0
- package/build/promo/types.d.ts +14 -0
- package/build/promo/types.d.ts.map +1 -0
- package/build/promo/types.js +2 -0
- package/build/promo/types.js.map +1 -0
- package/build/promo.d.ts +7 -0
- package/build/promo.d.ts.map +1 -0
- package/build/promo.js +25 -0
- package/build/promo.js.map +1 -0
- package/build/regions/types.d.ts +32 -0
- package/build/regions/types.d.ts.map +1 -0
- package/build/regions/types.js +2 -0
- package/build/regions/types.js.map +1 -0
- package/build/regions.d.ts +15 -0
- package/build/regions.d.ts.map +1 -0
- package/build/regions.js +43 -0
- package/build/regions.js.map +1 -0
- package/build/service.d.ts.map +1 -1
- package/build/service.js +24 -9
- package/build/service.js.map +1 -1
- package/build/types.d.ts +619 -52
- package/build/types.d.ts.map +1 -1
- package/build/types.local.d.ts +4 -0
- package/build/types.local.d.ts.map +1 -0
- package/build/types.local.js +2 -0
- package/build/types.local.js.map +1 -0
- package/build/view/types.d.ts +33 -0
- package/build/view/types.d.ts.map +1 -0
- package/build/view/types.js +2 -0
- package/build/view/types.js.map +1 -0
- package/build/view.d.ts +13 -0
- package/build/view.d.ts.map +1 -0
- package/build/view.js +78 -0
- package/build/view.js.map +1 -0
- package/package.json +14 -12
- package/src/advertise.ts +13 -0
- package/src/checkout/consts.ts +1 -0
- package/src/checkout/index.ts +5 -0
- package/src/checkout/narrow/types.ts +27 -0
- package/src/checkout/narrow.ts +63 -0
- package/src/checkout/protocols.ts +39 -0
- package/src/checkout/types.ts +27 -0
- package/src/consts.local.ts +34 -0
- package/src/consts.ts +417 -24
- package/src/consumer/cancel.ts +40 -0
- package/src/consumer/consts.local.ts +16 -0
- package/src/consumer/consts.ts +46 -0
- package/src/consumer/copy/types.ts +54 -0
- package/src/consumer/copy.ts +121 -0
- package/src/consumer/deadline/types.ts +30 -0
- package/src/consumer/deadline.ts +61 -0
- package/src/consumer/fifo/types.ts +17 -0
- package/src/consumer/fifo.ts +42 -0
- package/src/consumer/index.ts +17 -0
- package/src/consumer/policy/types.ts +20 -0
- package/src/consumer/policy.ts +101 -0
- package/src/consumer/protocols.ts +116 -0
- package/src/consumer/refund/types.ts +27 -0
- package/src/consumer/refund.ts +136 -0
- package/src/consumer/refusal.ts +35 -0
- package/src/consumer/revive/types.ts +23 -0
- package/src/consumer/revive.ts +82 -0
- package/src/consumer/types.local.ts +10 -0
- package/src/consumer/types.ts +189 -0
- package/src/countries.ts +5 -0
- package/src/entitled.ts +20 -0
- package/src/entitlement/types.ts +29 -0
- package/src/entitlement.ts +86 -0
- package/src/errors.ts +445 -0
- package/src/estimate/types.ts +34 -0
- package/src/estimate.ts +90 -0
- package/src/i18n/consumer-rights/be.json +131 -0
- package/src/i18n/consumer-rights/de.json +131 -0
- package/src/i18n/consumer-rights/en.json +131 -0
- package/src/i18n/consumer-rights/es.json +131 -0
- package/src/i18n/consumer-rights/fr.json +131 -0
- package/src/i18n/consumer-rights/pl.json +131 -0
- package/src/i18n/consumer-rights/ru.json +131 -0
- package/src/i18n/consumer-rights/uk.json +131 -0
- package/src/i18n/errors/be.json +30 -0
- package/src/i18n/errors/de.json +30 -0
- package/src/i18n/errors/en.json +30 -0
- package/src/i18n/errors/es.json +30 -0
- package/src/i18n/errors/fr.json +30 -0
- package/src/i18n/errors/pl.json +30 -0
- package/src/i18n/errors/ru.json +30 -0
- package/src/i18n/errors/uk.json +30 -0
- package/src/i18n/fr.json +39 -0
- package/src/i18n.ts +58 -8
- package/src/index.ts +19 -2
- package/src/limit/types.ts +41 -0
- package/src/limit.ts +132 -0
- package/src/model/checkout.ts +12 -7
- package/src/model/consts.local.ts +83 -0
- package/src/model/consts.ts +206 -0
- package/src/model/consumer.ts +294 -0
- package/src/model/estimate.ts +73 -0
- package/src/model/index.ts +7 -2
- package/src/model/limit.ts +36 -0
- package/src/model/plan.ts +25 -12
- package/src/model/portal.ts +25 -0
- package/src/model/pricing.ts +34 -0
- package/src/model/view.ts +17 -0
- package/src/pricing/types.ts +13 -0
- package/src/pricing.ts +110 -0
- package/src/promo/types.ts +18 -0
- package/src/promo.ts +46 -0
- package/src/regions/types.ts +42 -0
- package/src/regions.ts +85 -0
- package/src/service.ts +32 -15
- package/src/types.local.ts +5 -0
- package/src/types.ts +669 -49
- package/src/view/types.ts +39 -0
- package/src/view.ts +119 -0
- package/tests/checkout-narrow.spec.ts +75 -0
- package/tests/consumer-copy.spec.ts +378 -0
- package/tests/consumer-deadline.spec.ts +85 -0
- package/tests/consumer-fifo.spec.ts +61 -0
- package/tests/consumer-protocols.spec.ts +103 -0
- package/tests/consumer-refund.spec.ts +134 -0
- package/tests/consumer-regions.spec.ts +140 -0
- package/tests/consumer-wire.spec.ts +170 -0
- package/tests/contract.spec.ts +183 -0
- package/tests/entitlement.spec.ts +103 -0
- package/tests/errors.spec.ts +168 -0
- package/tests/estimate.spec.ts +139 -0
- package/tests/limit.spec.ts +117 -0
- package/tests/pricing.spec.ts +30 -0
- package/tests/tsconfig.json +11 -0
- package/tests/view.spec.ts +130 -0
- package/tsconfig.json +6 -1
- package/build/.gitkeep +0 -0
- package/src/model/subscription.ts +0 -63
- package/src/model/utils.ts +0 -32
- package/src/modules.ts +0 -43
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AmountCheckoutPolicy, AmountNarrowing, AmountPolicyView } from '../../types.js';
|
|
2
|
+
import type { NarrowAmountPolicyOptions } from '../types.js';
|
|
3
|
+
/** An amount policy narrowed for one entity, and the amounts it still allows. */
|
|
4
|
+
export interface AmountNarrowingHelper {
|
|
5
|
+
/**
|
|
6
|
+
* An amount policy narrowed for one entity — the one computation the server's refusal and the
|
|
7
|
+
* dialog's control share, so a disabled control and a refusal cannot disagree.
|
|
8
|
+
*
|
|
9
|
+
* - The maximum is the smallest of the base maximum and every narrowing's; the reason, reset and
|
|
10
|
+
* remaining come from the narrowing that set it (the first on a tie).
|
|
11
|
+
* - Presets above the maximum are dropped; the default is clamped into `[minimum, maximum]`.
|
|
12
|
+
* - `limit` is `null` when no narrowing lowered the base maximum.
|
|
13
|
+
* - `blocked` (`limit.maximumMinor < base.minimumMinor`) means NO amount may be bought now. The
|
|
14
|
+
* returned `policy` then stays a VALID policy pinned to the minimum (maximum = default =
|
|
15
|
+
* minimum, no presets above it), so a validator never throws on it; the UI disables the input
|
|
16
|
+
* and the confirm button on `limit.blocked`, and the server refuses every amount with
|
|
17
|
+
* `CheckoutLimitExceeded` — neither may read the pinned policy as "the minimum is allowed".
|
|
18
|
+
*
|
|
19
|
+
* @throws PaymentError (`checkout-policy:*`) when the base policy itself is invalid.
|
|
20
|
+
*/
|
|
21
|
+
narrowAmountPolicy: (base: AmountCheckoutPolicy, narrowings: AmountNarrowing[], opts?: NarrowAmountPolicyOptions) => AmountPolicyView;
|
|
22
|
+
/** Whether an amount may be bought under a narrowed view: never when blocked. */
|
|
23
|
+
amountAllowed: (view: AmountPolicyView, amountMinor: number) => boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/checkout/narrow/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAC7F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,EAAE,CAClB,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,IAAI,CAAC,EAAE,yBAAyB,KACxF,gBAAgB,CAAA;IACrB,iFAAiF;IACjF,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAA;CACxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/checkout/narrow/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AmountCheckoutPolicy, AmountNarrowing, AmountPolicyView } from '../types.js';
|
|
2
|
+
import type { AmountNarrowingHelper } from './narrow/types.js';
|
|
3
|
+
import type { NarrowAmountPolicyOptions } from './types.js';
|
|
4
|
+
export declare const createAmountNarrowingHelper: () => AmountNarrowingHelper;
|
|
5
|
+
export declare const amountNarrowingHelper: AmountNarrowingHelper;
|
|
6
|
+
/** @deprecated compat:factory-refactor — use `amountNarrowingHelper.narrowAmountPolicy(…)` */
|
|
7
|
+
export declare const narrowAmountPolicy: (base: AmountCheckoutPolicy, narrowings: AmountNarrowing[], opts?: NarrowAmountPolicyOptions) => AmountPolicyView;
|
|
8
|
+
//# sourceMappingURL=narrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../src/checkout/narrow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAA;AAC7G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,eAAO,MAAM,2BAA2B,QAAO,qBAkD9C,CAAA;AAED,eAAO,MAAM,qBAAqB,uBAAgC,CAAA;AAElE,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,SACvB,oBAAoB,cAAc,eAAe,EAAE,SAAS,yBAAyB,KAC1F,gBAAoF,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { checkoutPricingHelper } from '../pricing.js';
|
|
2
|
+
export const createAmountNarrowingHelper = () => {
|
|
3
|
+
const maximumOf = (narrowing) => Number.isFinite(narrowing.maximumMinor) ? Math.max(0, Math.floor(narrowing.maximumMinor)) : 0;
|
|
4
|
+
const narrowAmountPolicy = (base, narrowings, opts = {}) => {
|
|
5
|
+
checkoutPricingHelper.assertAmountCheckoutPolicy(base);
|
|
6
|
+
let setter = null;
|
|
7
|
+
let maximum = base.maximumMinor;
|
|
8
|
+
for (const narrowing of narrowings) {
|
|
9
|
+
const candidate = maximumOf(narrowing);
|
|
10
|
+
if (candidate < maximum) {
|
|
11
|
+
maximum = candidate;
|
|
12
|
+
setter = narrowing;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (setter == null) {
|
|
16
|
+
return { policy: base, limit: null };
|
|
17
|
+
}
|
|
18
|
+
const blocked = maximum < base.minimumMinor;
|
|
19
|
+
const ceiling = blocked ? base.minimumMinor : maximum;
|
|
20
|
+
const policy = {
|
|
21
|
+
...base,
|
|
22
|
+
maximumMinor: ceiling,
|
|
23
|
+
defaultMinor: Math.min(Math.max(base.defaultMinor, base.minimumMinor), ceiling),
|
|
24
|
+
presetsMinor: base.presetsMinor.filter(preset => preset <= ceiling),
|
|
25
|
+
};
|
|
26
|
+
const limit = {
|
|
27
|
+
productSku: opts.productSku ?? '',
|
|
28
|
+
...(opts.planSku != null ? { planSku: opts.planSku } : {}),
|
|
29
|
+
currency: base.currency,
|
|
30
|
+
minimumMinor: base.minimumMinor,
|
|
31
|
+
maximumMinor: maximum,
|
|
32
|
+
narrowed: true,
|
|
33
|
+
blocked,
|
|
34
|
+
reason: setter.reason,
|
|
35
|
+
...(setter.resetsAt != null ? { resetsAt: setter.resetsAt } : {}),
|
|
36
|
+
...(setter.remainingMinor != null ? { remainingMinor: setter.remainingMinor } : {}),
|
|
37
|
+
};
|
|
38
|
+
return { policy: checkoutPricingHelper.assertAmountCheckoutPolicy(policy), limit };
|
|
39
|
+
};
|
|
40
|
+
const amountAllowed = (view, amountMinor) => view.limit?.blocked !== true && Number.isSafeInteger(amountMinor)
|
|
41
|
+
&& amountMinor >= view.policy.minimumMinor && amountMinor <= view.policy.maximumMinor;
|
|
42
|
+
return { narrowAmountPolicy, amountAllowed };
|
|
43
|
+
};
|
|
44
|
+
export const amountNarrowingHelper = createAmountNarrowingHelper();
|
|
45
|
+
/** @deprecated compat:factory-refactor — use `amountNarrowingHelper.narrowAmountPolicy(…)` */
|
|
46
|
+
export const narrowAmountPolicy = (base, narrowings, opts) => amountNarrowingHelper.narrowAmountPolicy(base, narrowings, opts);
|
|
47
|
+
//# sourceMappingURL=narrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|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YAAY,IAAI,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAA;IAEvF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAA;AAC9C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,EAAE,CAAA;AAElE,8FAA8F;AAC9F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,IAA0B,EAAE,UAA6B,EAAE,IAAgC,EACzE,EAAE,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CheckoutReadProtocolOptions, CheckoutReadProtocols } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The read side of checkout: `amountPolicy` GET `/amount-policy?productSku&planSku` and
|
|
4
|
+
* `planPrices` GET `/plan-prices?productSku`, under the application's guarded `parent` (or its own
|
|
5
|
+
* `guards`). Aliases are `<prefix>:<name>`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const makeCheckoutReadProtocols: (opts: CheckoutReadProtocolOptions) => CheckoutReadProtocols;
|
|
8
|
+
//# sourceMappingURL=protocols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocols.d.ts","sourceRoot":"","sources":["../../src/checkout/protocols.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEpF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,SAAU,2BAA2B,KAAG,qBAwB7E,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { contract, openProtocol, protocol, typed } from '@owlmeans/entrypoint';
|
|
2
|
+
import { backend, route, RouteMethod } from '@owlmeans/route';
|
|
3
|
+
import { AmountPolicyQuerySchema, AmountPolicyViewSchema, PlanPriceListSchema, PlanPricesQuerySchema, } from '../model/consumer.js';
|
|
4
|
+
import { CHECKOUT_READ_API_PATH } from './consts.js';
|
|
5
|
+
/**
|
|
6
|
+
* The read side of checkout: `amountPolicy` GET `/amount-policy?productSku&planSku` and
|
|
7
|
+
* `planPrices` GET `/plan-prices?productSku`, under the application's guarded `parent` (or its own
|
|
8
|
+
* `guards`). Aliases are `<prefix>:<name>`.
|
|
9
|
+
*/
|
|
10
|
+
export const makeCheckoutReadProtocols = (opts) => {
|
|
11
|
+
if (opts.parent == null && opts.guards == null) {
|
|
12
|
+
throw new SyntaxError('checkout-read: the routes need either a parent or explicit guards');
|
|
13
|
+
}
|
|
14
|
+
const alias = (name) => `${opts.prefix}:${name}`;
|
|
15
|
+
const path = opts.path ?? CHECKOUT_READ_API_PATH;
|
|
16
|
+
const base = opts.parent != null
|
|
17
|
+
? openProtocol(route(alias('base'), path, backend({ parent: opts.parent })))
|
|
18
|
+
: openProtocol(route(alias('base'), path, backend()), {
|
|
19
|
+
guards: opts.guards,
|
|
20
|
+
...(opts.gate != null ? { gate: opts.gate } : {}),
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
base,
|
|
24
|
+
amountPolicy: protocol(route(alias('amount-policy'), '/amount-policy', backend({ parent: base, method: RouteMethod.GET })), contract.request({ query: typed(AmountPolicyQuerySchema) }, AmountPolicyViewSchema)),
|
|
25
|
+
planPrices: protocol(route(alias('plan-prices'), '/plan-prices', backend({ parent: base, method: RouteMethod.GET })), contract.request({ query: typed(PlanPricesQuerySchema) }, PlanPriceListSchema)),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=protocols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../../src/checkout/protocols.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC9E,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WA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,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,EACnG,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,CAAoB,uBAAuB,CAAC,EAAE,EAAE,sBAAsB,CAAC,CACvG;QACD,UAAU,EAAE,QAAQ,CAClB,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,EAC/F,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,CAAkB,qBAAqB,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAChG;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RouteParent } from '@owlmeans/route';
|
|
2
|
+
import type { EntrypointOptions, EntrypointProtocol, OpenRequest, OpenValue } from '@owlmeans/entrypoint';
|
|
3
|
+
import type { AmountPolicyQuery, AmountPolicyView, PlanPriceList, PlanPricesQuery } from '../types.js';
|
|
4
|
+
export interface NarrowAmountPolicyOptions {
|
|
5
|
+
productSku?: string;
|
|
6
|
+
planSku?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CheckoutReadProtocolOptions {
|
|
9
|
+
/** Alias prefix of every declaration, e.g. `my-app:account:checkout`. */
|
|
10
|
+
prefix: string;
|
|
11
|
+
/** The application's guarded parent — its guards and gate are inherited. */
|
|
12
|
+
parent?: RouteParent;
|
|
13
|
+
guards?: EntrypointOptions['guards'];
|
|
14
|
+
gate?: EntrypointOptions['gate'];
|
|
15
|
+
/** Default `/checkout`. */
|
|
16
|
+
path?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CheckoutReadProtocols {
|
|
19
|
+
base: EntrypointProtocol<OpenRequest, OpenValue>;
|
|
20
|
+
/** The entity's amount policy as narrowed now — the same computation the checkout enforces. */
|
|
21
|
+
amountPolicy: EntrypointProtocol<{
|
|
22
|
+
query: AmountPolicyQuery;
|
|
23
|
+
}, AmountPolicyView>;
|
|
24
|
+
/** The prices a product's plans are charged at, per currency, as last synchronized. */
|
|
25
|
+
planPrices: EntrypointProtocol<{
|
|
26
|
+
query: PlanPricesQuery;
|
|
27
|
+
}, PlanPriceList>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/checkout/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACzG,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEtG,MAAM,WAAW,yBAAyB;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IACpC,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAChC,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;IAChD,+FAA+F;IAC/F,YAAY,EAAE,kBAAkB,CAAC;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE,EAAE,gBAAgB,CAAC,CAAA;IAChF,uFAAuF;IACvF,UAAU,EAAE,kBAAkB,CAAC;QAAE,KAAK,EAAE,eAAe,CAAA;KAAE,EAAE,aAAa,CAAC,CAAA;CAC1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/checkout/types.ts"],"names":[],"mappings":""}
|
package/build/consts.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { JSONSchemaType } from 'ajv';
|
|
2
|
+
import type { PricingPolicy } from './types.js';
|
|
2
3
|
export declare enum ProductType {
|
|
3
4
|
Simple = "simple",
|
|
4
5
|
Service = "service",
|
|
5
6
|
Consumable = "consumable"
|
|
6
7
|
}
|
|
8
|
+
export declare enum CheckoutPricingMode {
|
|
9
|
+
Quantity = "quantity",
|
|
10
|
+
Amount = "amount"
|
|
11
|
+
}
|
|
7
12
|
export declare enum PaymentEntityType {
|
|
8
13
|
Product = "product",
|
|
9
14
|
Plan = "plan",
|
|
@@ -33,18 +38,160 @@ export declare enum SubscriptionStatus {
|
|
|
33
38
|
Trial = "trial",
|
|
34
39
|
Canceled = "canceled",
|
|
35
40
|
Expired = "expired",
|
|
41
|
+
/** Revoked until resumed: unpaid, paused, or collection paused. */
|
|
36
42
|
Suspended = "suspended",
|
|
37
43
|
Blocked = "blocked",
|
|
38
44
|
Ended = "ended",
|
|
39
|
-
Free = "free",
|
|
40
45
|
Active = "active",
|
|
41
|
-
|
|
46
|
+
/** Payment failed and is being retried: still entitled, flagged. */
|
|
47
|
+
PastDue = "past-due"
|
|
48
|
+
}
|
|
49
|
+
/** The statuses that grant a plan's capabilities and limits. */
|
|
50
|
+
export declare const ENTITLING_STATUSES: readonly SubscriptionStatus[];
|
|
51
|
+
/** The statuses a subscription never leaves on its own. */
|
|
52
|
+
export declare const TERMINAL_STATUSES: readonly SubscriptionStatus[];
|
|
53
|
+
/** How a limit's counter renews. */
|
|
54
|
+
export declare enum LimitKind {
|
|
55
|
+
/** Renews on the calendar UTC or subscription-anchored `LimitWindow`. */
|
|
56
|
+
Window = "window",
|
|
57
|
+
/** Never renews: the counter belongs to the entity and survives plan changes. */
|
|
58
|
+
Lifetime = "lifetime",
|
|
59
|
+
/** A held count (`+1` on acquire, `-1` on release), reconciled against reality. */
|
|
60
|
+
Occupancy = "occupancy"
|
|
61
|
+
}
|
|
62
|
+
/** Calendar UTC windows, or a seven-day window anchored at subscription creation. */
|
|
63
|
+
export declare enum LimitWindow {
|
|
64
|
+
Day = "day",
|
|
65
|
+
Month = "month",
|
|
66
|
+
SubscriptionWeek = "subscription-week"
|
|
67
|
+
}
|
|
68
|
+
export declare const SUBSCRIPTION_WEEK_MS: number;
|
|
69
|
+
export declare const SUBSCRIPTION_WEEK_PREFIX = "subscription-week:";
|
|
70
|
+
/** Which paygate portal flow a portal link opens. */
|
|
71
|
+
export declare enum PortalFlow {
|
|
72
|
+
Manage = "manage",
|
|
73
|
+
Cancel = "cancel",
|
|
74
|
+
Update = "update",
|
|
75
|
+
Change = "change",
|
|
76
|
+
PaymentMethod = "payment-method"
|
|
77
|
+
}
|
|
78
|
+
/** Whether a price's amount includes tax, or tax is added on top — never inferred, always declared. */
|
|
79
|
+
export declare enum TaxBehavior {
|
|
80
|
+
Exclusive = "exclusive",
|
|
81
|
+
Inclusive = "inclusive"
|
|
82
|
+
}
|
|
83
|
+
/** What a price estimate says about tax at one billing country. */
|
|
84
|
+
export declare enum TaxEstimateStatus {
|
|
85
|
+
/** Tax is due and its rate(s) are in `TaxEstimate.rates`. */
|
|
86
|
+
Taxed = "taxed",
|
|
87
|
+
/** No tax because the buyer's tax id shifts liability to them (EU/GB reverse charge). */
|
|
88
|
+
ReverseCharge = "reverse-charge",
|
|
89
|
+
/** No tax for any other reason (not registered there, exempt, zero-rated). */
|
|
90
|
+
None = "none",
|
|
91
|
+
/** The gateway could not resolve a rate from what it was given; the real total shows at checkout. */
|
|
92
|
+
AtCheckout = "at-checkout",
|
|
93
|
+
/** No country was given and none could be inferred from the entity's paygate customer. */
|
|
94
|
+
LocationRequired = "location-required"
|
|
95
|
+
}
|
|
96
|
+
/** A tax type a rate carries, collapsed from Stripe's finer `tax_type` for display. */
|
|
97
|
+
export declare enum TaxType {
|
|
98
|
+
Vat = "vat",
|
|
99
|
+
Gst = "gst",
|
|
100
|
+
SalesTax = "sales-tax",
|
|
101
|
+
/** Any other Stripe `tax_type` (excise, lease, tourism, …). */
|
|
102
|
+
Tax = "tax"
|
|
103
|
+
}
|
|
104
|
+
/** The paygate alias of subscriptions the application grants itself (a free plan, a comp). */
|
|
105
|
+
export declare const INTERNAL_PAYGATE = "internal";
|
|
106
|
+
/**
|
|
107
|
+
* Where a billing country sits for consumer rights and the charge currency: inside the declared
|
|
108
|
+
* consumer-rights territories (`ConsumerRightsPolicy.countries`) or outside them.
|
|
109
|
+
*/
|
|
110
|
+
export declare enum ConsumerRegion {
|
|
111
|
+
Eu = "eu",
|
|
112
|
+
Other = "other"
|
|
113
|
+
}
|
|
114
|
+
/** What a purchase — a window of the right of withdrawal — was. */
|
|
115
|
+
export declare enum PurchaseKind {
|
|
116
|
+
/** A paid one-time checkout of an amount or quantity plan (prepaid credits). */
|
|
117
|
+
TopUp = "top-up",
|
|
118
|
+
/** The FIRST invoice of a subscription. Renewals are not purchases. */
|
|
119
|
+
Subscription = "subscription"
|
|
120
|
+
}
|
|
121
|
+
/** What a consumer expressly requested. */
|
|
122
|
+
export declare enum ConsentKind {
|
|
123
|
+
/** Start performing now, before the withdrawal period of a credit purchase ends. */
|
|
124
|
+
Performance = "performance",
|
|
125
|
+
/** Start a subscription's services now — given before its checkout. */
|
|
126
|
+
SubscriptionStart = "subscription-start"
|
|
127
|
+
}
|
|
128
|
+
/** What a consumer declared through a statutory function. */
|
|
129
|
+
export declare enum DeclarationKind {
|
|
130
|
+
Withdrawal = "withdrawal",
|
|
131
|
+
Cancellation = "cancellation"
|
|
132
|
+
}
|
|
133
|
+
/** Where a declaration was made: signed in, or through the public page without a login. */
|
|
134
|
+
export declare enum DeclarationChannel {
|
|
135
|
+
InApp = "in-app",
|
|
136
|
+
Public = "public"
|
|
137
|
+
}
|
|
138
|
+
export declare enum CancellationKind {
|
|
139
|
+
Ordinary = "ordinary",
|
|
140
|
+
/** For cause; carries a reason. */
|
|
141
|
+
Extraordinary = "extraordinary"
|
|
142
|
+
}
|
|
143
|
+
export declare enum WithdrawalStatus {
|
|
144
|
+
/** Recorded; nothing is disclosed yet (a public declaration always answers this). */
|
|
145
|
+
Received = "received",
|
|
146
|
+
Processing = "processing",
|
|
147
|
+
Refunded = "refunded",
|
|
148
|
+
/** Recorded, and left to an operator: no usage meter, or automatic refunds are off. */
|
|
149
|
+
Review = "review",
|
|
150
|
+
Failed = "failed",
|
|
151
|
+
/** Received after the withdrawal period ended; recorded, not executed. */
|
|
152
|
+
Expired = "expired"
|
|
153
|
+
}
|
|
154
|
+
export declare enum CancellationStatus {
|
|
155
|
+
Received = "received",
|
|
156
|
+
Scheduled = "scheduled",
|
|
157
|
+
AlreadyScheduled = "already-scheduled",
|
|
158
|
+
/** Recorded and left to an operator — an extraordinary cancellation (for cause). */
|
|
159
|
+
Review = "review"
|
|
160
|
+
}
|
|
161
|
+
export declare enum WithdrawalUnavailableReason {
|
|
162
|
+
NotInScope = "not-in-scope",
|
|
163
|
+
Expired = "expired",
|
|
164
|
+
Withdrawn = "withdrawn",
|
|
165
|
+
/** Fully performed after consent: the right of withdrawal has expired, nothing would be reimbursed. */
|
|
166
|
+
Performed = "performed",
|
|
167
|
+
Unknown = "unknown"
|
|
168
|
+
}
|
|
169
|
+
export declare enum CancellationUnavailableReason {
|
|
170
|
+
NoSubscription = "no-subscription",
|
|
171
|
+
Ended = "ended"
|
|
42
172
|
}
|
|
173
|
+
export declare const ConsumerRegionSchema: JSONSchemaType<ConsumerRegion>;
|
|
174
|
+
export declare const PurchaseKindSchema: JSONSchemaType<PurchaseKind>;
|
|
175
|
+
export declare const ConsentKindSchema: JSONSchemaType<ConsentKind>;
|
|
176
|
+
export declare const DeclarationKindSchema: JSONSchemaType<DeclarationKind>;
|
|
177
|
+
export declare const DeclarationChannelSchema: JSONSchemaType<DeclarationChannel>;
|
|
178
|
+
export declare const CancellationKindSchema: JSONSchemaType<CancellationKind>;
|
|
179
|
+
export declare const WithdrawalStatusSchema: JSONSchemaType<WithdrawalStatus>;
|
|
180
|
+
export declare const CancellationStatusSchema: JSONSchemaType<CancellationStatus>;
|
|
181
|
+
export declare const WithdrawalUnavailableReasonSchema: JSONSchemaType<WithdrawalUnavailableReason>;
|
|
182
|
+
export declare const CancellationUnavailableReasonSchema: JSONSchemaType<CancellationUnavailableReason>;
|
|
43
183
|
export declare const ProductTypeSchema: JSONSchemaType<ProductType>;
|
|
184
|
+
export declare const CheckoutPricingModeSchema: JSONSchemaType<CheckoutPricingMode>;
|
|
44
185
|
export declare const PaymentEntityTypeSchema: JSONSchemaType<PaymentEntityType>;
|
|
45
186
|
export declare const PlanStatusSchema: JSONSchemaType<PlanStatus>;
|
|
46
187
|
export declare const PlanDurationSchema: JSONSchemaType<PlanDuration>;
|
|
47
188
|
export declare const SubscriptionStatusSchema: JSONSchemaType<SubscriptionStatus>;
|
|
189
|
+
export declare const LimitKindSchema: JSONSchemaType<LimitKind>;
|
|
190
|
+
export declare const LimitWindowSchema: JSONSchemaType<LimitWindow>;
|
|
191
|
+
export declare const PortalFlowSchema: JSONSchemaType<PortalFlow>;
|
|
192
|
+
export declare const TaxBehaviorSchema: JSONSchemaType<TaxBehavior>;
|
|
193
|
+
export declare const TaxEstimateStatusSchema: JSONSchemaType<TaxEstimateStatus>;
|
|
194
|
+
export declare const TaxTypeSchema: JSONSchemaType<TaxType>;
|
|
48
195
|
export declare const ProductTitleSchema: JSONSchemaType<string>;
|
|
49
196
|
export declare const ProductDescriptionSchema: JSONSchemaType<string>;
|
|
50
197
|
export declare const LocalizationLngSchema: JSONSchemaType<string>;
|
|
@@ -54,29 +201,99 @@ export declare const PLAN_RECORD_TYPE = "plan";
|
|
|
54
201
|
export declare const PLAN_RECORD_PREFIX = "plan";
|
|
55
202
|
export declare const L10N_RECORD_TYPE = "l10n";
|
|
56
203
|
export declare const L10N_RECORD_PREFIX = "l10n";
|
|
204
|
+
/** A singleton record: at most one per configuration, at this fixed id. */
|
|
205
|
+
export declare const PRICING_POLICY_RECORD_TYPE = "pricing-policy";
|
|
206
|
+
export declare const PRICING_POLICY_RECORD_ID = "pricing-policy";
|
|
207
|
+
/** A singleton record: the declared `ConsumerRightsPolicy`, at this fixed id. */
|
|
208
|
+
export declare const CONSUMER_RIGHTS_RECORD_TYPE = "consumer-rights-policy";
|
|
209
|
+
export declare const CONSUMER_RIGHTS_RECORD_ID = "consumer-rights-policy";
|
|
210
|
+
/** The i18n resource (library tier, `lib` namespace) holding the consumer-rights legal copy. */
|
|
211
|
+
export declare const CONSUMER_RIGHTS_RESOURCE = "payment-consumer-rights";
|
|
212
|
+
/**
|
|
213
|
+
* The version of the legal copy this package ships. Bumped on ANY change to a
|
|
214
|
+
* `payment-consumer-rights` bundle, so a consent recorded against an older wording is told apart.
|
|
215
|
+
*/
|
|
216
|
+
export declare const CONSUMER_RIGHTS_COPY_VERSION = "2026-10-04.2";
|
|
57
217
|
export declare const DEFAULT_ALIAS = "payment";
|
|
58
218
|
export declare const PAYMENT_SERVICE = "payment";
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
219
|
+
/**
|
|
220
|
+
* ISO 3166-1 alpha-2 country code → lowercase ISO 4217 currency code — the currency circulating in
|
|
221
|
+
* that country, for the "≈ local total" line of a price estimate. Not a Stripe list: Stripe Tax can
|
|
222
|
+
* compute a rate for a country this map has no entry for (or none at all, `location-required`), and
|
|
223
|
+
* `currencyOfCountry` returning `null` just means the estimate carries no local-currency line, never
|
|
224
|
+
* a rejected request.
|
|
225
|
+
*
|
|
226
|
+
* A territory that circulates another country's currency (Ecuador, Kosovo, Puerto Rico, …) is
|
|
227
|
+
* mapped to that currency, not left out.
|
|
228
|
+
*/
|
|
229
|
+
export declare const COUNTRY_CURRENCIES: Readonly<Record<string, string>>;
|
|
230
|
+
/** Every country code `COUNTRY_CURRENCIES` names, sorted. */
|
|
231
|
+
export declare const COUNTRY_CODES: readonly string[];
|
|
232
|
+
/**
|
|
233
|
+
* A permissive ISO 3166-1 alpha-2 shape (two uppercase letters) — not restricted to
|
|
234
|
+
* `COUNTRY_CURRENCIES`, so a country this map cannot name a currency for is still a valid request;
|
|
235
|
+
* it only loses the local-currency line of its estimate.
|
|
236
|
+
*/
|
|
237
|
+
export declare const CountrySchema: JSONSchemaType<string>;
|
|
238
|
+
/**
|
|
239
|
+
* The gate alias a paid capability is asserted under.
|
|
240
|
+
*
|
|
241
|
+
* Distinct from `paymentGate.base` (a ROUTE id) and from the gateway service alias — three
|
|
242
|
+
* different things that would otherwise all be called "payment gate".
|
|
243
|
+
*/
|
|
244
|
+
export declare const ENTITLEMENT_GATE = "entitlement-gate";
|
|
245
|
+
/**
|
|
246
|
+
* The gate alias a plan limit is asserted under (`limit:<key>[>=n]`).
|
|
247
|
+
*
|
|
248
|
+
* A separate alias from `ENTITLEMENT_GATE` because the framework collects an entrypoint's gates
|
|
249
|
+
* per gate SERVICE: a capability requirement and a limit requirement under one alias would hide
|
|
250
|
+
* each other.
|
|
251
|
+
*/
|
|
252
|
+
export declare const LIMIT_GATE = "limit-gate";
|
|
253
|
+
/**
|
|
254
|
+
* The capability scope that carries FEATURE flags.
|
|
255
|
+
*
|
|
256
|
+
* Kept apart from `renewable`, which carries numeric quotas that are consumed or counted. Merging
|
|
257
|
+
* them would make "has one production slot left" and "may remove the platform credit" the same
|
|
258
|
+
* number, and the first purchase that spent the quota would take the feature with it.
|
|
259
|
+
*/
|
|
260
|
+
export declare const CAPABILITY_FEATURE_SCOPE = "feature";
|
|
261
|
+
/**
|
|
262
|
+
* The scope RESERVED for limit parameters (`limit:<key>[>=n]`).
|
|
263
|
+
*
|
|
264
|
+
* Never a declarable capability scope: a plan's limits live in `ProductPlan.limits`, and a
|
|
265
|
+
* capability predicate refuses any parameter under this scope, so a limit requirement can never be
|
|
266
|
+
* satisfied by a capability grant.
|
|
267
|
+
*/
|
|
268
|
+
export declare const CAPABILITY_LIMIT_SCOPE = "limit";
|
|
269
|
+
/**
|
|
270
|
+
* Preserves today's fixed behavior for every consumer that declares no policy: automatic tax and
|
|
271
|
+
* tax-id collection stay on for every checkout (`taxOptions` before this policy existed), no
|
|
272
|
+
* `behavior` is forced onto a synced price, no Adaptive Pricing, and the estimate endpoints are off
|
|
273
|
+
* (a new capability, opt-in only).
|
|
274
|
+
*/
|
|
275
|
+
export declare const DEFAULT_PRICING_POLICY: PricingPolicy;
|
|
276
|
+
/** The window key a lifetime limit's counter lives under. */
|
|
277
|
+
export declare const LIFETIME_WINDOW = "lifetime";
|
|
278
|
+
/** The window key an occupancy limit's counter lives under. */
|
|
279
|
+
export declare const OCCUPANCY_WINDOW = "occupancy";
|
|
280
|
+
/** The 27 EU member states (ISO 3166-1 alpha-2; Greece is `GR`, as Stripe reports it). */
|
|
281
|
+
export declare const EU_COUNTRIES: readonly string[];
|
|
282
|
+
/**
|
|
283
|
+
* The member states plus the parts of them that carry their own ISO code — Åland (FI) and the
|
|
284
|
+
* French outermost regions (French Guiana, Guadeloupe, Martinique, Réunion, Mayotte, Saint-Martin).
|
|
285
|
+
* EU consumer law applies there even where EU VAT does not; the Canary Islands, Azores and Madeira
|
|
286
|
+
* share their state's code. Scope beyond the member states is a question for the lawyer.
|
|
287
|
+
*/
|
|
288
|
+
export declare const EU_CONSUMER_TERRITORIES: readonly string[];
|
|
289
|
+
/** The EEA members outside the EU. */
|
|
290
|
+
export declare const EEA_EXTRA: readonly string[];
|
|
291
|
+
/** The territories whose consumers have the right of withdrawal by default: the EU's and the EEA's. */
|
|
292
|
+
export declare const CONSUMER_RIGHTS_TERRITORIES: readonly string[];
|
|
293
|
+
/**
|
|
294
|
+
* Country → the language of its legal copy, only where that is unambiguous (Belgium, Luxembourg,
|
|
295
|
+
* Switzerland, Canada … are absent and fall back to the policy's default). An application widens
|
|
296
|
+
* or overrides it with `ConsumerRightsPolicy.languages`.
|
|
297
|
+
*/
|
|
298
|
+
export declare const COUNTRY_LANGUAGES: Readonly<Record<string, string>>;
|
|
82
299
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,aAAa,mBAAmB;CACjC;AAED,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB;;;OAGG;IACH,UAAU,eAAe;CAC1B;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