@pithy-sh/payments 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/coverage.d.ts +2 -0
- package/dist/admin/coverage.js +2 -0
- package/dist/admin/read.d.ts +2 -0
- package/dist/admin/read.js +2 -0
- package/dist/audit/actions.d.ts +2 -0
- package/dist/audit/actions.js +2 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +14 -0
- package/dist/client/api.d.ts +2 -0
- package/dist/client/api.js +2 -0
- package/dist/client/checkout.d.ts +2 -0
- package/dist/client/checkout.js +2 -0
- package/dist/client/fixtures/price-preview-de.js +2 -0
- package/dist/client/fixtures/price-preview-gb.js +2 -0
- package/dist/client/fixtures/price-preview-jp-yen.js +2 -0
- package/dist/client/fixtures/price-preview-us-country-only.js +2 -0
- package/dist/client/fixtures/price-preview-us-new-york.js +2 -0
- package/dist/client/fixtures/pricePreview.d.ts +2 -0
- package/dist/client/fixtures/pricePreview.js +2 -0
- package/dist/client/hooks.d.ts +2 -0
- package/dist/client/hooks.js +2 -0
- package/dist/client/paddle.d.ts +2 -0
- package/dist/client/paddle.js +2 -0
- package/dist/client/paddleCache.d.ts +2 -0
- package/dist/client/paddleCache.js +2 -0
- package/dist/client/paddlePrices.d.ts +2 -0
- package/dist/client/paddlePrices.js +2 -0
- package/dist/client/paddlePricesTag.d.ts +2 -0
- package/dist/client/paddlePricesTag.js +2 -0
- package/dist/client/projection.d.ts +2 -0
- package/dist/client/projection.js +2 -0
- package/dist/client/test-utils/cacheStore.d.ts +2 -0
- package/dist/client/test-utils/cacheStore.js +2 -0
- package/dist/client/wholeUnits.d.ts +2 -0
- package/dist/client/wholeUnits.js +2 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/data/discount.d.ts +2 -0
- package/dist/data/discount.js +2 -0
- package/dist/data/entitlement.d.ts +2 -0
- package/dist/data/entitlement.js +2 -0
- package/dist/data/money.d.ts +2 -0
- package/dist/data/money.js +2 -0
- package/dist/data/pause.d.ts +2 -0
- package/dist/data/pause.js +2 -0
- package/dist/data/providerAccount.d.ts +2 -0
- package/dist/data/providerAccount.js +2 -0
- package/dist/data/purchase.d.ts +2 -0
- package/dist/data/purchase.js +2 -0
- package/dist/data/rail.d.ts +2 -0
- package/dist/data/rail.js +2 -0
- package/dist/data/reconcileRun.d.ts +2 -0
- package/dist/data/reconcileRun.js +2 -0
- package/dist/data/renderMoney.d.ts +2 -0
- package/dist/data/renderMoney.js +2 -0
- package/dist/data/status.d.ts +2 -0
- package/dist/data/status.js +2 -0
- package/dist/data/subject.d.ts +2 -0
- package/dist/data/subject.js +2 -0
- package/dist/data/subscription.d.ts +2 -0
- package/dist/data/subscription.js +2 -0
- package/dist/data/syncCursor.d.ts +2 -0
- package/dist/data/syncCursor.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/data/webhookEvent.d.ts +2 -0
- package/dist/data/webhookEvent.js +2 -0
- package/dist/entitlement/manual.d.ts +2 -0
- package/dist/entitlement/manual.js +2 -0
- package/dist/entitlement/resolver.d.ts +2 -0
- package/dist/entitlement/resolver.js +2 -0
- package/dist/entitlement/subjectSeam.d.ts +2 -0
- package/dist/entitlement/subjectSeam.js +2 -0
- package/dist/entitlement/unimplementedSubject.d.ts +25 -0
- package/dist/entitlement/unimplementedSubject.d.ts.map +1 -0
- package/dist/entitlement/unimplementedSubject.js +78 -0
- package/dist/error/errors.d.ts +2 -0
- package/dist/error/errors.js +2 -0
- package/dist/grants/apply.d.ts +2 -0
- package/dist/grants/apply.js +2 -0
- package/dist/grants/clawback.d.ts +2 -0
- package/dist/grants/clawback.js +2 -0
- package/dist/grants/ledgerSeam.d.ts +2 -0
- package/dist/grants/ledgerSeam.js +2 -0
- package/dist/http/dispatch.d.ts +2 -0
- package/dist/http/dispatch.js +2 -0
- package/dist/http/guards.d.ts +2 -0
- package/dist/http/guards.js +2 -0
- package/dist/http/manifestConfig.d.ts +2 -0
- package/dist/http/manifestConfig.js +2 -0
- package/dist/http/responses.d.ts +2 -0
- package/dist/http/responses.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/http/scopes.d.ts +2 -0
- package/dist/http/scopes.js +2 -0
- package/dist/http/view.d.ts +2 -0
- package/dist/http/view.js +2 -0
- package/dist/http/webhookGuard.d.ts +2 -0
- package/dist/http/webhookGuard.js +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/migrations/0001_purchases.d.ts +2 -0
- package/dist/migrations/0001_purchases.js +2 -0
- package/dist/paddle-prices.iife.js +1 -0
- package/dist/pricing/location.d.ts +2 -0
- package/dist/pricing/location.js +2 -0
- package/dist/pricing/visitor.d.ts +2 -0
- package/dist/pricing/visitor.js +2 -0
- package/dist/projection/event.d.ts +2 -0
- package/dist/projection/event.js +2 -0
- package/dist/projection/orphans.d.ts +2 -0
- package/dist/projection/orphans.js +2 -0
- package/dist/projection/owner.d.ts +2 -0
- package/dist/projection/owner.js +2 -0
- package/dist/projection/resolve.d.ts +2 -0
- package/dist/projection/resolve.js +2 -0
- package/dist/projection/writer.d.ts +2 -0
- package/dist/projection/writer.js +2 -0
- package/dist/provision/resolvePaymentsConfig.d.ts +2 -0
- package/dist/provision/resolvePaymentsConfig.js +2 -0
- package/dist/rails/apple/certs.d.ts +2 -0
- package/dist/rails/apple/certs.js +2 -0
- package/dist/rails/apple/der.d.ts +2 -0
- package/dist/rails/apple/der.js +2 -0
- package/dist/rails/apple/fixtures/chain.d.ts +2 -0
- package/dist/rails/apple/fixtures/chain.js +2 -0
- package/dist/rails/apple/http.d.ts +2 -0
- package/dist/rails/apple/http.js +2 -0
- package/dist/rails/apple/jws.d.ts +2 -0
- package/dist/rails/apple/jws.js +2 -0
- package/dist/rails/apple/notification.d.ts +2 -0
- package/dist/rails/apple/notification.js +2 -0
- package/dist/rails/apple/rail.d.ts +2 -0
- package/dist/rails/apple/rail.js +2 -0
- package/dist/rails/apple/serverApi.d.ts +2 -0
- package/dist/rails/apple/serverApi.js +2 -0
- package/dist/rails/apple/verify.d.ts +2 -0
- package/dist/rails/apple/verify.js +2 -0
- package/dist/rails/apple/x509.d.ts +2 -0
- package/dist/rails/apple/x509.js +2 -0
- package/dist/rails/contract.d.ts +2 -0
- package/dist/rails/contract.js +2 -0
- package/dist/rails/google/fixtures/push.d.ts +2 -0
- package/dist/rails/google/fixtures/push.js +2 -0
- package/dist/rails/google/http.d.ts +2 -0
- package/dist/rails/google/http.js +2 -0
- package/dist/rails/google/jwt.d.ts +2 -0
- package/dist/rails/google/jwt.js +2 -0
- package/dist/rails/google/oidc.d.ts +2 -0
- package/dist/rails/google/oidc.js +2 -0
- package/dist/rails/google/playApi.d.ts +2 -0
- package/dist/rails/google/playApi.js +2 -0
- package/dist/rails/google/rail.d.ts +2 -0
- package/dist/rails/google/rail.js +2 -0
- package/dist/rails/google/rtdn.d.ts +2 -0
- package/dist/rails/google/rtdn.js +2 -0
- package/dist/rails/google/verify.d.ts +2 -0
- package/dist/rails/google/verify.js +2 -0
- package/dist/rails/lemonSqueezy/api.d.ts +2 -0
- package/dist/rails/lemonSqueezy/api.js +2 -0
- package/dist/rails/lemonSqueezy/checkout.d.ts +2 -0
- package/dist/rails/lemonSqueezy/checkout.js +2 -0
- package/dist/rails/lemonSqueezy/discounts.d.ts +2 -0
- package/dist/rails/lemonSqueezy/discounts.js +2 -0
- package/dist/rails/lemonSqueezy/fixtures/events.d.ts +2 -0
- package/dist/rails/lemonSqueezy/fixtures/events.js +2 -0
- package/dist/rails/lemonSqueezy/objects.d.ts +2 -0
- package/dist/rails/lemonSqueezy/objects.js +2 -0
- package/dist/rails/lemonSqueezy/portal.d.ts +2 -0
- package/dist/rails/lemonSqueezy/portal.js +2 -0
- package/dist/rails/lemonSqueezy/pricing.d.ts +2 -0
- package/dist/rails/lemonSqueezy/pricing.js +2 -0
- package/dist/rails/lemonSqueezy/rail.d.ts +2 -0
- package/dist/rails/lemonSqueezy/rail.js +2 -0
- package/dist/rails/lemonSqueezy/read.d.ts +2 -0
- package/dist/rails/lemonSqueezy/read.js +2 -0
- package/dist/rails/lemonSqueezy/refresh.d.ts +2 -0
- package/dist/rails/lemonSqueezy/refresh.js +2 -0
- package/dist/rails/lemonSqueezy/signature.d.ts +2 -0
- package/dist/rails/lemonSqueezy/signature.js +2 -0
- package/dist/rails/lemonSqueezy/verify.d.ts +2 -0
- package/dist/rails/lemonSqueezy/verify.js +2 -0
- package/dist/rails/lemonSqueezy/webhook.d.ts +2 -0
- package/dist/rails/lemonSqueezy/webhook.js +2 -0
- package/dist/rails/paddle/adjustments.d.ts +2 -0
- package/dist/rails/paddle/adjustments.js +2 -0
- package/dist/rails/paddle/api.d.ts +2 -0
- package/dist/rails/paddle/api.js +2 -0
- package/dist/rails/paddle/checkout.d.ts +2 -0
- package/dist/rails/paddle/checkout.js +2 -0
- package/dist/rails/paddle/discounts.d.ts +2 -0
- package/dist/rails/paddle/discounts.js +2 -0
- package/dist/rails/paddle/events.d.ts +2 -0
- package/dist/rails/paddle/events.js +2 -0
- package/dist/rails/paddle/fixtures/browserForged.d.ts +2 -0
- package/dist/rails/paddle/fixtures/browserForged.js +2 -0
- package/dist/rails/paddle/fixtures/pausedSubscription.d.ts +2 -0
- package/dist/rails/paddle/fixtures/pausedSubscription.js +2 -0
- package/dist/rails/paddle/objects.d.ts +2 -0
- package/dist/rails/paddle/objects.js +2 -0
- package/dist/rails/paddle/portal.d.ts +2 -0
- package/dist/rails/paddle/portal.js +2 -0
- package/dist/rails/paddle/rail.d.ts +2 -0
- package/dist/rails/paddle/rail.js +2 -0
- package/dist/rails/paddle/read.d.ts +2 -0
- package/dist/rails/paddle/read.js +2 -0
- package/dist/rails/paddle/recorded.d.ts +2 -0
- package/dist/rails/paddle/recorded.js +2 -0
- package/dist/rails/paddle/refresh.d.ts +2 -0
- package/dist/rails/paddle/refresh.js +2 -0
- package/dist/rails/paddle/refund.d.ts +2 -0
- package/dist/rails/paddle/refund.js +2 -0
- package/dist/rails/paddle/signature.d.ts +2 -0
- package/dist/rails/paddle/signature.js +2 -0
- package/dist/rails/paddle/subscription.d.ts +2 -0
- package/dist/rails/paddle/subscription.js +2 -0
- package/dist/rails/paddle/verify.d.ts +2 -0
- package/dist/rails/paddle/verify.js +2 -0
- package/dist/rails/paddle/webhook.d.ts +2 -0
- package/dist/rails/paddle/webhook.js +2 -0
- package/dist/rails/providers.d.ts +2 -0
- package/dist/rails/providers.js +2 -0
- package/dist/rails/stripe/api.d.ts +2 -0
- package/dist/rails/stripe/api.js +2 -0
- package/dist/rails/stripe/checkout.d.ts +2 -0
- package/dist/rails/stripe/checkout.js +2 -0
- package/dist/rails/stripe/discounts.d.ts +2 -0
- package/dist/rails/stripe/discounts.js +2 -0
- package/dist/rails/stripe/fixtures/events.d.ts +2 -0
- package/dist/rails/stripe/fixtures/events.js +2 -0
- package/dist/rails/stripe/objects.d.ts +2 -0
- package/dist/rails/stripe/objects.js +2 -0
- package/dist/rails/stripe/portal.d.ts +2 -0
- package/dist/rails/stripe/portal.js +2 -0
- package/dist/rails/stripe/pricing.d.ts +2 -0
- package/dist/rails/stripe/pricing.js +2 -0
- package/dist/rails/stripe/rail.d.ts +2 -0
- package/dist/rails/stripe/rail.js +2 -0
- package/dist/rails/stripe/refresh.d.ts +2 -0
- package/dist/rails/stripe/refresh.js +2 -0
- package/dist/rails/stripe/signature.d.ts +2 -0
- package/dist/rails/stripe/signature.js +2 -0
- package/dist/rails/stripe/verify.d.ts +2 -0
- package/dist/rails/stripe/verify.js +2 -0
- package/dist/rails/stripe/webhook.d.ts +2 -0
- package/dist/rails/stripe/webhook.js +2 -0
- package/dist/secret/registry.d.ts +2 -0
- package/dist/secret/registry.js +2 -0
- package/dist/seeds/example.d.ts +2 -0
- package/dist/seeds/example.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/dist/workflows/paddleSweep.d.ts +2 -0
- package/dist/workflows/paddleSweep.js +2 -0
- package/dist/workflows/railAccess.d.ts +2 -0
- package/dist/workflows/railAccess.js +2 -0
- package/dist/workflows/reconcile.d.ts +2 -0
- package/dist/workflows/reconcile.js +2 -0
- package/dist/workflows/report.d.ts +2 -0
- package/dist/workflows/report.js +2 -0
- package/dist/workflows/retryPolicy.d.ts +2 -0
- package/dist/workflows/retryPolicy.js +2 -0
- package/dist/workflows/specs.d.ts +2 -0
- package/dist/workflows/specs.js +2 -0
- package/dist/workflows/worker.d.ts +2 -0
- package/dist/workflows/worker.js +2 -0
- package/dist/workflows/workerConfig.d.ts +2 -0
- package/dist/workflows/workerConfig.js +2 -0
- package/package.json +5 -5
- package/pithy.manifest.json +2 -2
- package/src/capability.ts +16 -0
- package/src/entitlement/unimplementedSubject.ts +89 -0
- package/src/index.ts +8 -0
- package/src/version.generated.ts +1 -1
- package/src/workflows/paddleSweep.ts +1 -1
package/dist/admin/coverage.d.ts
CHANGED
package/dist/admin/coverage.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { PAYMENTS_ENTITLEMENTS_READ_SCOPE, PAYMENTS_PURCHASES_READ_SCOPE, PAYMENTS_RECONCILE_READ_SCOPE, PAYMENTS_SUBSCRIPTIONS_READ_SCOPE } from "../http/scopes.js";
|
|
2
4
|
//#region src/admin/coverage.ts
|
|
3
5
|
/** Every payments table, and what a management client may learn from it. */
|
package/dist/admin/read.d.ts
CHANGED
package/dist/admin/read.js
CHANGED
package/dist/audit/actions.d.ts
CHANGED
package/dist/audit/actions.js
CHANGED
package/dist/capability.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { type Capability } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { DatabaseSpecMap } from "@pithy-sh/core/src/data/databases";
|
|
3
5
|
import type { KvNamespaceSpecMap } from "@pithy-sh/core/src/kv/namespaces";
|
package/dist/capability.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,KAAK,EAAE,uBAAuB,EAAuB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,KAAK,EAAE,uBAAuB,EAAuB,MAAM,2BAA2B,CAAC;AAS9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAK7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG;IAClD;;;;OAIG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAsMF,6FAA6F;AAC7F,MAAM,WAAW,kBACf,SAAQ,UAAU,CAAC,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,iBAAiB,CAAC;IAC7F,4BAA4B;IAC5B,cAAc,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CA6FrE;AAED,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,kBAAkB,CAE7F"}
|
package/dist/capability.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { PaymentsConfig } from "./config/config.js";
|
|
2
4
|
import { paymentsTables } from "./data/tables.js";
|
|
3
5
|
import { installEntitlementResolver } from "./entitlement/resolver.js";
|
|
6
|
+
import { requireImplementedSubject } from "./entitlement/unimplementedSubject.js";
|
|
4
7
|
import { paymentsManifestConfig } from "./http/manifestConfig.js";
|
|
5
8
|
import { paymentsSecretsRegistry } from "./secret/registry.js";
|
|
6
9
|
import { paymentsWorkflows } from "./workflows/specs.js";
|
|
@@ -81,6 +84,16 @@ function checkLedgerGrants({ capabilities }, config) {
|
|
|
81
84
|
* request that ever works, so there is nothing to lose by refusing to boot, and a Worker that boots into
|
|
82
85
|
* that state is one whose first symptom is a support ticket from a paying company.
|
|
83
86
|
*/
|
|
87
|
+
/**
|
|
88
|
+
* **An unimplemented resolver is not an absent one, and this check is deliberately blind to the
|
|
89
|
+
* difference.** `pithy add payments --set billingSubject=organization` scaffolds
|
|
90
|
+
* `src/billing/subject.ts` exporting a placeholder branded unimplemented, and passes it here. It is a
|
|
91
|
+
* resolver, so this returns — which it must, because `payments()` runs every time a Worker's
|
|
92
|
+
* `pithy.config.ts` is evaluated and the CLI evaluates it on nearly every command. Refusing the
|
|
93
|
+
* placeholder here would leave the adopter with no `pithy` at all in the project the scaffold just landed
|
|
94
|
+
* in. `requireImplementedSubject`, on the capability's `boot` hook, is where the placeholder is refused —
|
|
95
|
+
* `createEntrypoint` runs it and nothing else does, so the Worker still will not serve (#500).
|
|
96
|
+
*/
|
|
84
97
|
function requireResolvableSubject(config, resolveSubject) {
|
|
85
98
|
if (config.billingSubject !== "organization" || resolveSubject !== void 0) return;
|
|
86
99
|
throw new ValidationError({
|
|
@@ -200,6 +213,7 @@ function payments(options) {
|
|
|
200
213
|
secretRegistry: paymentsSecretsRegistry,
|
|
201
214
|
workflows: paymentsWorkflows,
|
|
202
215
|
compose: (context) => checkLedgerGrants(context, resolved),
|
|
216
|
+
boot: () => requireImplementedSubject(resolveSubject),
|
|
203
217
|
client: ({ environment }) => clientProjection(resolved, environment),
|
|
204
218
|
requiredBindings,
|
|
205
219
|
config: PaymentsConfig,
|
package/dist/client/api.d.ts
CHANGED
package/dist/client/api.js
CHANGED
package/dist/client/checkout.js
CHANGED
package/dist/client/hooks.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { type EntitlementView, type PaddleCheckoutHandoff, type PaymentsClientOptions, type PaymentsClientRail, type PaymentsFailure, type PaymentsHostedRail, type PurchaseView } from "./api";
|
|
2
4
|
import { type PaddleCheckoutOptions } from "./checkout";
|
|
3
5
|
import { type PaddleJs, type PaddleOptions, type PaddlePriceQuery, type PaddleSetup, type PricePreview } from "./paddle";
|
package/dist/client/hooks.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { getEntitlements, openBillingPortal, openStoreSubscriptions, restorePurchases, startCheckout, submitPurchase } from "./api.js";
|
|
2
4
|
import { loadPaddle, previewPrices, priceQueryKey } from "./paddle.js";
|
|
3
5
|
import { openPaddleCheckout } from "./checkout.js";
|
package/dist/client/paddle.d.ts
CHANGED
package/dist/client/paddle.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { PAYMENTS_NO_BROWSER, PAYMENTS_UNREADABLE } from "./api.js";
|
|
2
4
|
import { cachedAnswer, readQuoteCache, rememberAnswer } from "./paddleCache.js";
|
|
3
5
|
import { withoutZeroFraction } from "./wholeUnits.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** One figure, in both of the forms Paddle sends it in, and what it is denominated in. */
|
|
2
4
|
export interface WholeUnitPrice {
|
|
3
5
|
/** Paddle's own rendering of the figure for this visitor. The only thing ever returned. */
|
package/dist/config/config.d.ts
CHANGED
package/dist/config/config.js
CHANGED
package/dist/data/discount.d.ts
CHANGED
package/dist/data/discount.js
CHANGED
package/dist/data/entitlement.js
CHANGED
package/dist/data/money.d.ts
CHANGED
package/dist/data/money.js
CHANGED
package/dist/data/pause.d.ts
CHANGED
package/dist/data/pause.js
CHANGED
package/dist/data/purchase.d.ts
CHANGED
package/dist/data/purchase.js
CHANGED
package/dist/data/rail.d.ts
CHANGED
package/dist/data/rail.js
CHANGED
package/dist/data/renderMoney.js
CHANGED
package/dist/data/status.d.ts
CHANGED
package/dist/data/status.js
CHANGED
package/dist/data/subject.d.ts
CHANGED
package/dist/data/subject.js
CHANGED
package/dist/data/syncCursor.js
CHANGED
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { PithyMiddleware } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { EntitlementHolder, EntitlementResolver } from "@pithy-sh/core/src/entitlement/entitlement";
|
|
3
5
|
import { type PaymentsSubject } from "../data/subject";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import type { PaymentsSubjectResolver } from "./subjectSeam";
|
|
4
|
+
/**
|
|
5
|
+
* The scaffolded resolver: branded unimplemented, and a throw if anything ever calls it.
|
|
6
|
+
*
|
|
7
|
+
* A throw rather than `undefined`, and it is belt and braces rather than the mechanism — {@link
|
|
8
|
+
* requireImplementedSubject} means a deployed Worker never gets here. What it covers is every other way
|
|
9
|
+
* this function could be reached: a test composing the capability directly, a tool that assembles a
|
|
10
|
+
* backend without an entrypoint (`pithy ui` reads the composed route tree that way), an adopter who
|
|
11
|
+
* imported the placeholder somewhere of their own. In all of them a loud failure is the right answer and a
|
|
12
|
+
* quiet `undefined` is the failure mode of the stub this replaces.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unimplementedSubject: PaymentsSubjectResolver;
|
|
15
|
+
/** Whether this resolver is the scaffolded placeholder rather than something the adopter wrote. */
|
|
16
|
+
export declare function isUnimplementedSubject(resolver: PaymentsSubjectResolver | undefined): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Refuse a Worker whose subject resolver is still the scaffolded placeholder.
|
|
19
|
+
*
|
|
20
|
+
* Called from the capability's `boot` hook, which `createEntrypoint` runs and nothing else does. The
|
|
21
|
+
* message is the adopter's next action and nothing else: the file is named, the question it has to answer
|
|
22
|
+
* is stated, and the alternative is the other billing mode.
|
|
23
|
+
*/
|
|
24
|
+
export declare function requireImplementedSubject(resolver: PaymentsSubjectResolver | undefined): void;
|
|
25
|
+
//# sourceMappingURL=unimplementedSubject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unimplementedSubject.d.ts","sourceRoot":"","sources":["../../src/entitlement/unimplementedSubject.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAwC7D;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,uBAWP,CAAC;AAE7B,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,GAAG,OAAO,CAE7F;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,GAAG,IAAI,CAS7F"}
|