@pithy-sh/payments 0.1.1 → 0.1.3
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 +35 -0
- package/dist/admin/coverage.d.ts.map +1 -0
- package/dist/admin/coverage.js +56 -0
- package/dist/admin/read.d.ts +222 -0
- package/dist/admin/read.d.ts.map +1 -0
- package/dist/admin/read.js +159 -0
- package/dist/audit/actions.d.ts +211 -0
- package/dist/audit/actions.d.ts.map +1 -0
- package/dist/audit/actions.js +211 -0
- package/dist/capability.d.ts +72 -0
- package/dist/capability.d.ts.map +1 -0
- package/dist/capability.js +228 -0
- package/dist/client/api.d.ts +435 -0
- package/dist/client/api.d.ts.map +1 -0
- package/dist/client/api.js +415 -0
- package/dist/client/checkout.d.ts +144 -0
- package/dist/client/checkout.d.ts.map +1 -0
- package/dist/client/checkout.js +173 -0
- package/dist/client/fixtures/price-preview-de.js +89 -0
- package/dist/client/fixtures/price-preview-gb.js +89 -0
- package/dist/client/fixtures/price-preview-jp-yen.js +89 -0
- package/dist/client/fixtures/price-preview-us-country-only.js +89 -0
- package/dist/client/fixtures/price-preview-us-new-york.js +89 -0
- package/dist/client/fixtures/pricePreview.d.ts +54 -0
- package/dist/client/fixtures/pricePreview.d.ts.map +1 -0
- package/dist/client/fixtures/pricePreview.js +61 -0
- package/dist/client/hooks.d.ts +235 -0
- package/dist/client/hooks.d.ts.map +1 -0
- package/dist/client/hooks.js +428 -0
- package/dist/client/paddle.d.ts +433 -0
- package/dist/client/paddle.d.ts.map +1 -0
- package/dist/client/paddle.js +391 -0
- package/dist/client/paddleCache.d.ts +123 -0
- package/dist/client/paddleCache.d.ts.map +1 -0
- package/dist/client/paddleCache.js +159 -0
- package/dist/client/paddlePrices.d.ts +94 -0
- package/dist/client/paddlePrices.d.ts.map +1 -0
- package/dist/client/paddlePrices.js +55 -0
- package/dist/client/paddlePricesTag.d.ts +127 -0
- package/dist/client/paddlePricesTag.d.ts.map +1 -0
- package/dist/client/paddlePricesTag.js +207 -0
- package/dist/client/projection.d.ts +128 -0
- package/dist/client/projection.d.ts.map +1 -0
- package/dist/client/projection.js +0 -0
- package/dist/client/test-utils/cacheStore.d.ts +18 -0
- package/dist/client/test-utils/cacheStore.d.ts.map +1 -0
- package/dist/client/test-utils/cacheStore.js +42 -0
- package/dist/client/wholeUnits.d.ts +18 -0
- package/dist/client/wholeUnits.d.ts.map +1 -0
- package/dist/client/wholeUnits.js +120 -0
- package/dist/config/config.d.ts +238 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +249 -0
- package/dist/data/discount.d.ts +127 -0
- package/dist/data/discount.d.ts.map +1 -0
- package/dist/data/discount.js +91 -0
- package/dist/data/entitlement.d.ts +43 -0
- package/dist/data/entitlement.d.ts.map +1 -0
- package/dist/data/entitlement.js +43 -0
- package/dist/data/money.d.ts +15 -0
- package/dist/data/money.d.ts.map +1 -0
- package/dist/data/money.js +76 -0
- package/dist/data/pause.d.ts +133 -0
- package/dist/data/pause.d.ts.map +1 -0
- package/dist/data/pause.js +63 -0
- package/dist/data/providerAccount.d.ts +40 -0
- package/dist/data/providerAccount.d.ts.map +1 -0
- package/dist/data/providerAccount.js +34 -0
- package/dist/data/purchase.d.ts +107 -0
- package/dist/data/purchase.d.ts.map +1 -0
- package/dist/data/purchase.js +77 -0
- package/dist/data/rail.d.ts +74 -0
- package/dist/data/rail.d.ts.map +1 -0
- package/dist/data/rail.js +74 -0
- package/dist/data/reconcileRun.d.ts +120 -0
- package/dist/data/reconcileRun.d.ts.map +1 -0
- package/dist/data/reconcileRun.js +120 -0
- package/dist/data/renderMoney.d.ts +85 -0
- package/dist/data/renderMoney.d.ts.map +1 -0
- package/dist/data/renderMoney.js +146 -0
- package/dist/data/status.d.ts +58 -0
- package/dist/data/status.d.ts.map +1 -0
- package/dist/data/status.js +68 -0
- package/dist/data/subject.d.ts +111 -0
- package/dist/data/subject.d.ts.map +1 -0
- package/dist/data/subject.js +125 -0
- package/dist/data/subscription.d.ts +624 -0
- package/dist/data/subscription.d.ts.map +1 -0
- package/dist/data/subscription.js +497 -0
- package/dist/data/syncCursor.d.ts +33 -0
- package/dist/data/syncCursor.d.ts.map +1 -0
- package/dist/data/syncCursor.js +29 -0
- package/dist/data/tables.d.ts +37 -0
- package/dist/data/tables.d.ts.map +1 -0
- package/dist/data/tables.js +44 -0
- package/dist/data/webhookEvent.d.ts +134 -0
- package/dist/data/webhookEvent.d.ts.map +1 -0
- package/dist/data/webhookEvent.js +128 -0
- package/dist/entitlement/manual.d.ts +101 -0
- package/dist/entitlement/manual.d.ts.map +1 -0
- package/dist/entitlement/manual.js +84 -0
- package/dist/entitlement/resolver.d.ts +60 -0
- package/dist/entitlement/resolver.d.ts.map +1 -0
- package/dist/entitlement/resolver.js +101 -0
- package/dist/entitlement/subjectSeam.d.ts +102 -0
- package/dist/entitlement/subjectSeam.d.ts.map +1 -0
- package/dist/entitlement/subjectSeam.js +85 -0
- package/dist/error/errors.d.ts +247 -0
- package/dist/error/errors.d.ts.map +1 -0
- package/dist/error/errors.js +326 -0
- package/dist/grants/apply.d.ts +74 -0
- package/dist/grants/apply.d.ts.map +1 -0
- package/dist/grants/apply.js +148 -0
- package/dist/grants/clawback.d.ts +43 -0
- package/dist/grants/clawback.d.ts.map +1 -0
- package/dist/grants/clawback.js +71 -0
- package/dist/grants/ledgerSeam.d.ts +89 -0
- package/dist/grants/ledgerSeam.d.ts.map +1 -0
- package/dist/grants/ledgerSeam.js +66 -0
- package/dist/http/dispatch.d.ts +35 -0
- package/dist/http/dispatch.d.ts.map +1 -0
- package/dist/http/dispatch.js +40 -0
- package/dist/http/guards.d.ts +43 -0
- package/dist/http/guards.d.ts.map +1 -0
- package/dist/http/guards.js +52 -0
- package/dist/http/manifestConfig.d.ts +38 -0
- package/dist/http/manifestConfig.d.ts.map +1 -0
- package/dist/http/manifestConfig.js +49 -0
- package/dist/http/responses.d.ts +1455 -0
- package/dist/http/responses.d.ts.map +1 -0
- package/dist/http/responses.js +728 -0
- package/dist/http/routes.d.ts +315 -0
- package/dist/http/routes.d.ts.map +1 -0
- package/dist/http/routes.js +1966 -0
- package/dist/http/schemas.d.ts +404 -0
- package/dist/http/schemas.d.ts.map +1 -0
- package/dist/http/schemas.js +359 -0
- package/dist/http/scopes.d.ts +160 -0
- package/dist/http/scopes.d.ts.map +1 -0
- package/dist/http/scopes.js +240 -0
- package/dist/http/view.d.ts +96 -0
- package/dist/http/view.d.ts.map +1 -0
- package/dist/http/view.js +170 -0
- package/dist/http/webhookGuard.d.ts +109 -0
- package/dist/http/webhookGuard.d.ts.map +1 -0
- package/dist/http/webhookGuard.js +206 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/migrations/0001_purchases.d.ts +35 -0
- package/dist/migrations/0001_purchases.d.ts.map +1 -0
- package/dist/migrations/0001_purchases.js +80 -0
- package/dist/pricing/location.d.ts +138 -0
- package/dist/pricing/location.d.ts.map +1 -0
- package/dist/pricing/location.js +81 -0
- package/dist/pricing/visitor.d.ts +56 -0
- package/dist/pricing/visitor.d.ts.map +1 -0
- package/dist/pricing/visitor.js +35 -0
- package/dist/projection/event.d.ts +66 -0
- package/dist/projection/event.d.ts.map +1 -0
- package/dist/projection/event.js +45 -0
- package/dist/projection/orphans.d.ts +114 -0
- package/dist/projection/orphans.d.ts.map +1 -0
- package/dist/projection/orphans.js +162 -0
- package/dist/projection/owner.d.ts +121 -0
- package/dist/projection/owner.d.ts.map +1 -0
- package/dist/projection/owner.js +114 -0
- package/dist/projection/resolve.d.ts +30 -0
- package/dist/projection/resolve.d.ts.map +1 -0
- package/dist/projection/resolve.js +42 -0
- package/dist/projection/writer.d.ts +103 -0
- package/dist/projection/writer.d.ts.map +1 -0
- package/dist/projection/writer.js +280 -0
- package/dist/provision/resolvePaymentsConfig.d.ts +48 -0
- package/dist/provision/resolvePaymentsConfig.d.ts.map +1 -0
- package/dist/provision/resolvePaymentsConfig.js +41 -0
- package/dist/rails/apple/certs.d.ts +7 -0
- package/dist/rails/apple/certs.d.ts.map +1 -0
- package/dist/rails/apple/certs.js +8 -0
- package/dist/rails/apple/der.d.ts +107 -0
- package/dist/rails/apple/der.d.ts.map +1 -0
- package/dist/rails/apple/der.js +217 -0
- package/dist/rails/apple/fixtures/chain.d.ts +117 -0
- package/dist/rails/apple/fixtures/chain.d.ts.map +1 -0
- package/dist/rails/apple/fixtures/chain.js +289 -0
- package/dist/rails/apple/http.d.ts +74 -0
- package/dist/rails/apple/http.d.ts.map +1 -0
- package/dist/rails/apple/http.js +32 -0
- package/dist/rails/apple/jws.d.ts +17 -0
- package/dist/rails/apple/jws.d.ts.map +1 -0
- package/dist/rails/apple/jws.js +75 -0
- package/dist/rails/apple/notification.d.ts +116 -0
- package/dist/rails/apple/notification.d.ts.map +1 -0
- package/dist/rails/apple/notification.js +199 -0
- package/dist/rails/apple/rail.d.ts +25 -0
- package/dist/rails/apple/rail.d.ts.map +1 -0
- package/dist/rails/apple/rail.js +68 -0
- package/dist/rails/apple/serverApi.d.ts +120 -0
- package/dist/rails/apple/serverApi.d.ts.map +1 -0
- package/dist/rails/apple/serverApi.js +244 -0
- package/dist/rails/apple/verify.d.ts +36 -0
- package/dist/rails/apple/verify.d.ts.map +1 -0
- package/dist/rails/apple/verify.js +46 -0
- package/dist/rails/apple/x509.d.ts +85 -0
- package/dist/rails/apple/x509.d.ts.map +1 -0
- package/dist/rails/apple/x509.js +273 -0
- package/dist/rails/contract.d.ts +871 -0
- package/dist/rails/contract.d.ts.map +1 -0
- package/dist/rails/contract.js +60 -0
- package/dist/rails/google/fixtures/push.d.ts +71 -0
- package/dist/rails/google/fixtures/push.d.ts.map +1 -0
- package/dist/rails/google/fixtures/push.js +107 -0
- package/dist/rails/google/http.d.ts +77 -0
- package/dist/rails/google/http.d.ts.map +1 -0
- package/dist/rails/google/http.js +39 -0
- package/dist/rails/google/jwt.d.ts +53 -0
- package/dist/rails/google/jwt.d.ts.map +1 -0
- package/dist/rails/google/jwt.js +94 -0
- package/dist/rails/google/oidc.d.ts +112 -0
- package/dist/rails/google/oidc.d.ts.map +1 -0
- package/dist/rails/google/oidc.js +179 -0
- package/dist/rails/google/playApi.d.ts +188 -0
- package/dist/rails/google/playApi.d.ts.map +1 -0
- package/dist/rails/google/playApi.js +350 -0
- package/dist/rails/google/rail.d.ts +57 -0
- package/dist/rails/google/rail.d.ts.map +1 -0
- package/dist/rails/google/rail.js +70 -0
- package/dist/rails/google/rtdn.d.ts +105 -0
- package/dist/rails/google/rtdn.d.ts.map +1 -0
- package/dist/rails/google/rtdn.js +179 -0
- package/dist/rails/google/verify.d.ts +20 -0
- package/dist/rails/google/verify.d.ts.map +1 -0
- package/dist/rails/google/verify.js +76 -0
- package/dist/rails/lemonSqueezy/api.d.ts +92 -0
- package/dist/rails/lemonSqueezy/api.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/api.js +121 -0
- package/dist/rails/lemonSqueezy/checkout.d.ts +52 -0
- package/dist/rails/lemonSqueezy/checkout.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/checkout.js +84 -0
- package/dist/rails/lemonSqueezy/discounts.d.ts +50 -0
- package/dist/rails/lemonSqueezy/discounts.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/discounts.js +75 -0
- package/dist/rails/lemonSqueezy/fixtures/events.d.ts +56 -0
- package/dist/rails/lemonSqueezy/fixtures/events.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/fixtures/events.js +144 -0
- package/dist/rails/lemonSqueezy/objects.d.ts +229 -0
- package/dist/rails/lemonSqueezy/objects.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/objects.js +379 -0
- package/dist/rails/lemonSqueezy/portal.d.ts +35 -0
- package/dist/rails/lemonSqueezy/portal.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/portal.js +18 -0
- package/dist/rails/lemonSqueezy/pricing.d.ts +25 -0
- package/dist/rails/lemonSqueezy/pricing.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/pricing.js +54 -0
- package/dist/rails/lemonSqueezy/rail.d.ts +41 -0
- package/dist/rails/lemonSqueezy/rail.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/rail.js +67 -0
- package/dist/rails/lemonSqueezy/read.d.ts +28 -0
- package/dist/rails/lemonSqueezy/read.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/read.js +37 -0
- package/dist/rails/lemonSqueezy/refresh.d.ts +42 -0
- package/dist/rails/lemonSqueezy/refresh.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/refresh.js +40 -0
- package/dist/rails/lemonSqueezy/signature.d.ts +56 -0
- package/dist/rails/lemonSqueezy/signature.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/signature.js +92 -0
- package/dist/rails/lemonSqueezy/verify.d.ts +33 -0
- package/dist/rails/lemonSqueezy/verify.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/verify.js +41 -0
- package/dist/rails/lemonSqueezy/webhook.d.ts +53 -0
- package/dist/rails/lemonSqueezy/webhook.d.ts.map +1 -0
- package/dist/rails/lemonSqueezy/webhook.js +179 -0
- package/dist/rails/paddle/adjustments.d.ts +60 -0
- package/dist/rails/paddle/adjustments.d.ts.map +1 -0
- package/dist/rails/paddle/adjustments.js +66 -0
- package/dist/rails/paddle/api.d.ts +138 -0
- package/dist/rails/paddle/api.d.ts.map +1 -0
- package/dist/rails/paddle/api.js +152 -0
- package/dist/rails/paddle/checkout.d.ts +69 -0
- package/dist/rails/paddle/checkout.d.ts.map +1 -0
- package/dist/rails/paddle/checkout.js +100 -0
- package/dist/rails/paddle/discounts.d.ts +67 -0
- package/dist/rails/paddle/discounts.d.ts.map +1 -0
- package/dist/rails/paddle/discounts.js +73 -0
- package/dist/rails/paddle/events.d.ts +140 -0
- package/dist/rails/paddle/events.d.ts.map +1 -0
- package/dist/rails/paddle/events.js +183 -0
- package/dist/rails/paddle/fixtures/browserForged.d.ts +42 -0
- package/dist/rails/paddle/fixtures/browserForged.d.ts.map +1 -0
- package/dist/rails/paddle/fixtures/browserForged.js +52 -0
- package/dist/rails/paddle/fixtures/pausedSubscription.d.ts +78 -0
- package/dist/rails/paddle/fixtures/pausedSubscription.d.ts.map +1 -0
- package/dist/rails/paddle/fixtures/pausedSubscription.js +76 -0
- package/dist/rails/paddle/objects.d.ts +519 -0
- package/dist/rails/paddle/objects.d.ts.map +1 -0
- package/dist/rails/paddle/objects.js +588 -0
- package/dist/rails/paddle/portal.d.ts +45 -0
- package/dist/rails/paddle/portal.d.ts.map +1 -0
- package/dist/rails/paddle/portal.js +42 -0
- package/dist/rails/paddle/rail.d.ts +55 -0
- package/dist/rails/paddle/rail.d.ts.map +1 -0
- package/dist/rails/paddle/rail.js +117 -0
- package/dist/rails/paddle/read.d.ts +53 -0
- package/dist/rails/paddle/read.d.ts.map +1 -0
- package/dist/rails/paddle/read.js +66 -0
- package/dist/rails/paddle/recorded.d.ts +49 -0
- package/dist/rails/paddle/recorded.d.ts.map +1 -0
- package/dist/rails/paddle/recorded.js +79 -0
- package/dist/rails/paddle/refresh.d.ts +54 -0
- package/dist/rails/paddle/refresh.d.ts.map +1 -0
- package/dist/rails/paddle/refresh.js +94 -0
- package/dist/rails/paddle/refund.d.ts +82 -0
- package/dist/rails/paddle/refund.d.ts.map +1 -0
- package/dist/rails/paddle/refund.js +175 -0
- package/dist/rails/paddle/signature.d.ts +83 -0
- package/dist/rails/paddle/signature.d.ts.map +1 -0
- package/dist/rails/paddle/signature.js +163 -0
- package/dist/rails/paddle/subscription.d.ts +137 -0
- package/dist/rails/paddle/subscription.d.ts.map +1 -0
- package/dist/rails/paddle/subscription.js +538 -0
- package/dist/rails/paddle/verify.d.ts +46 -0
- package/dist/rails/paddle/verify.d.ts.map +1 -0
- package/dist/rails/paddle/verify.js +43 -0
- package/dist/rails/paddle/webhook.d.ts +98 -0
- package/dist/rails/paddle/webhook.d.ts.map +1 -0
- package/dist/rails/paddle/webhook.js +181 -0
- package/dist/rails/providers.d.ts +73 -0
- package/dist/rails/providers.d.ts.map +1 -0
- package/dist/rails/providers.js +62 -0
- package/dist/rails/stripe/api.d.ts +118 -0
- package/dist/rails/stripe/api.d.ts.map +1 -0
- package/dist/rails/stripe/api.js +153 -0
- package/dist/rails/stripe/checkout.d.ts +60 -0
- package/dist/rails/stripe/checkout.d.ts.map +1 -0
- package/dist/rails/stripe/checkout.js +86 -0
- package/dist/rails/stripe/discounts.d.ts +50 -0
- package/dist/rails/stripe/discounts.d.ts.map +1 -0
- package/dist/rails/stripe/discounts.js +87 -0
- package/dist/rails/stripe/fixtures/events.d.ts +64 -0
- package/dist/rails/stripe/fixtures/events.d.ts.map +1 -0
- package/dist/rails/stripe/fixtures/events.js +67 -0
- package/dist/rails/stripe/objects.d.ts +237 -0
- package/dist/rails/stripe/objects.d.ts.map +1 -0
- package/dist/rails/stripe/objects.js +389 -0
- package/dist/rails/stripe/portal.d.ts +29 -0
- package/dist/rails/stripe/portal.d.ts.map +1 -0
- package/dist/rails/stripe/portal.js +41 -0
- package/dist/rails/stripe/pricing.d.ts +25 -0
- package/dist/rails/stripe/pricing.d.ts.map +1 -0
- package/dist/rails/stripe/pricing.js +68 -0
- package/dist/rails/stripe/rail.d.ts +28 -0
- package/dist/rails/stripe/rail.d.ts.map +1 -0
- package/dist/rails/stripe/rail.js +81 -0
- package/dist/rails/stripe/refresh.d.ts +33 -0
- package/dist/rails/stripe/refresh.d.ts.map +1 -0
- package/dist/rails/stripe/refresh.js +21 -0
- package/dist/rails/stripe/signature.d.ts +71 -0
- package/dist/rails/stripe/signature.d.ts.map +1 -0
- package/dist/rails/stripe/signature.js +92 -0
- package/dist/rails/stripe/verify.d.ts +15 -0
- package/dist/rails/stripe/verify.d.ts.map +1 -0
- package/dist/rails/stripe/verify.js +63 -0
- package/dist/rails/stripe/webhook.d.ts +26 -0
- package/dist/rails/stripe/webhook.d.ts.map +1 -0
- package/dist/rails/stripe/webhook.js +31 -0
- package/dist/secret/registry.d.ts +192 -0
- package/dist/secret/registry.d.ts.map +1 -0
- package/dist/secret/registry.js +154 -0
- package/dist/seeds/example.d.ts +3 -0
- package/dist/seeds/example.d.ts.map +1 -0
- package/dist/seeds/example.js +171 -0
- package/dist/version.generated.d.ts +5 -0
- package/dist/version.generated.d.ts.map +1 -0
- package/dist/version.generated.js +7 -0
- package/dist/workflows/paddleSweep.d.ts +175 -0
- package/dist/workflows/paddleSweep.d.ts.map +1 -0
- package/dist/workflows/paddleSweep.js +433 -0
- package/dist/workflows/railAccess.d.ts +48 -0
- package/dist/workflows/railAccess.d.ts.map +1 -0
- package/dist/workflows/railAccess.js +36 -0
- package/dist/workflows/reconcile.d.ts +161 -0
- package/dist/workflows/reconcile.d.ts.map +1 -0
- package/dist/workflows/reconcile.js +352 -0
- package/dist/workflows/report.d.ts +28 -0
- package/dist/workflows/report.d.ts.map +1 -0
- package/dist/workflows/report.js +54 -0
- package/dist/workflows/retryPolicy.d.ts +29 -0
- package/dist/workflows/retryPolicy.d.ts.map +1 -0
- package/dist/workflows/retryPolicy.js +37 -0
- package/dist/workflows/specs.d.ts +102 -0
- package/dist/workflows/specs.d.ts.map +1 -0
- package/dist/workflows/specs.js +84 -0
- package/dist/workflows/worker.d.ts +62 -0
- package/dist/workflows/worker.d.ts.map +1 -0
- package/dist/workflows/worker.js +92 -0
- package/dist/workflows/workerConfig.d.ts +46 -0
- package/dist/workflows/workerConfig.d.ts.map +1 -0
- package/dist/workflows/workerConfig.js +38 -0
- package/package.json +22 -13
- package/pithy.manifest.json +19 -13
- package/src/version.generated.ts +1 -1
- package/src/client/paddlePrices.iife.ts +0 -43
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PurchaseSubmission: z.ZodObject<{
|
|
3
|
+
rail: z.ZodEnum<{
|
|
4
|
+
apple: "apple";
|
|
5
|
+
google: "google";
|
|
6
|
+
lemonSqueezy: "lemonSqueezy";
|
|
7
|
+
paddle: "paddle";
|
|
8
|
+
stripe: "stripe";
|
|
9
|
+
}>;
|
|
10
|
+
receipt: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type PurchaseSubmission = z.infer<typeof PurchaseSubmission>;
|
|
13
|
+
export declare const RestoreRequest: z.ZodObject<{
|
|
14
|
+
rail: z.ZodEnum<{
|
|
15
|
+
apple: "apple";
|
|
16
|
+
google: "google";
|
|
17
|
+
lemonSqueezy: "lemonSqueezy";
|
|
18
|
+
paddle: "paddle";
|
|
19
|
+
stripe: "stripe";
|
|
20
|
+
}>;
|
|
21
|
+
receipts: z.ZodArray<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type RestoreRequest = z.infer<typeof RestoreRequest>;
|
|
24
|
+
/**
|
|
25
|
+
* Apple's webhook body. The Apple rail declares the same one field for itself, because it parses the bytes in
|
|
26
|
+
* order to verify them and must not import across the HTTP seam to do it. Change one, change the other.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AppleWebhookNotification: z.ZodObject<{
|
|
29
|
+
signedPayload: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type AppleWebhookNotification = z.infer<typeof AppleWebhookNotification>;
|
|
32
|
+
/**
|
|
33
|
+
* What a caller may ask to buy: a catalog product id, and nothing else.
|
|
34
|
+
*
|
|
35
|
+
* No price, no amount, no currency, no return URL. The price comes from the catalog entry the id resolves to,
|
|
36
|
+
* and the return URLs come from config — a client that could name where hosted Checkout returns to could send a
|
|
37
|
+
* paying customer to a page it controls, and a client that could name a price could buy Pro for the price of a
|
|
38
|
+
* coin pack. The purchaser is the subject the server resolves for the caller, as everywhere else.
|
|
39
|
+
*/
|
|
40
|
+
export declare const CheckoutRequest: z.ZodObject<{
|
|
41
|
+
productId: z.ZodString;
|
|
42
|
+
rail: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
lemonSqueezy: "lemonSqueezy";
|
|
44
|
+
paddle: "paddle";
|
|
45
|
+
stripe: "stripe";
|
|
46
|
+
}>>;
|
|
47
|
+
discountCode: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type CheckoutRequest = z.infer<typeof CheckoutRequest>;
|
|
50
|
+
/**
|
|
51
|
+
* ## The subscription lifecycle requests
|
|
52
|
+
*
|
|
53
|
+
* Four routes, and between them they accept two fields. That is the design rather than an accident of
|
|
54
|
+
* scope, and each absence below is load-bearing.
|
|
55
|
+
*
|
|
56
|
+
* **No subscription.** The route resolves it from the caller's own purchase rows, and there is no field
|
|
57
|
+
* a caller could send that would widen that set. A `subscriptionId` here would be a value a client
|
|
58
|
+
* supplies, and a value a client supplies is one they can point at somebody else's subscription — which
|
|
59
|
+
* this capability could not refuse, because it holds no members table and no ownership graph to check
|
|
60
|
+
* the claim against. The refusal has to be structural, exactly as `SubscriptionChangeInput` states it
|
|
61
|
+
* for the rail below.
|
|
62
|
+
*
|
|
63
|
+
* **No price.** {@link SubscriptionChangeRequest} names the *logical catalog product*, as
|
|
64
|
+
* {@link CheckoutRequest} does and for the same reason: a body-named `pri_…` moves a customer onto a
|
|
65
|
+
* plan this project does not sell, at a price it did not set. The catalog resolves the store's own
|
|
66
|
+
* identifier, server-side, after the product is known to exist.
|
|
67
|
+
*
|
|
68
|
+
* **No rail.** {@link CheckoutRequest} may name one because a rail is not a price and not a purchaser —
|
|
69
|
+
* it decides who takes the money on a purchase that has not happened yet. A subscription that already
|
|
70
|
+
* exists lives at exactly one store, and its own row says which. A named rail here could only ever be
|
|
71
|
+
* the wrong store asked about somebody's subscription.
|
|
72
|
+
*
|
|
73
|
+
* **No proration mode, and no `on_payment_failure`.** The rail picks the mode from the direction of the
|
|
74
|
+
* change and always prevents a change that cannot be paid for; `data/subscription.ts` holds the longer
|
|
75
|
+
* argument. Modeling either would make it a field, a field is a thing a client can set, and the value a
|
|
76
|
+
* client would eventually set is Paddle's `do_not_bill` — a free upgrade. It is unreachable because
|
|
77
|
+
* there is nowhere to write it.
|
|
78
|
+
*
|
|
79
|
+
* **No body at all on `keep`.** Withdrawing a scheduled cancellation takes no parameters: which
|
|
80
|
+
* subscription is the server's answer, and there is nothing to say about it but *do not*. So that route
|
|
81
|
+
* declares no schema and no `zValidator("json", …)`, exactly as `POST {base}/portal` does. A
|
|
82
|
+
* `z.object({})` would read as a refusal of everything and be neither — Zod strips rather than refuses —
|
|
83
|
+
* while making a POST with no body at all a 400 on a route that wants nothing.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* What a caller may move their subscription to: a catalog product id, and nothing else.
|
|
87
|
+
*
|
|
88
|
+
* The same one field {@link CheckoutRequest} leads with, bounded the same way, and meaning the same
|
|
89
|
+
* thing: the key in `products`, never a store SKU and never a price. An unknown one is a 404 on the
|
|
90
|
+
* product rather than a bad request, because whether this project sells something is a config-backed
|
|
91
|
+
* lookup and a schema constrains a string.
|
|
92
|
+
*/
|
|
93
|
+
export declare const SubscriptionChangeRequest: z.ZodObject<{
|
|
94
|
+
productId: z.ZodString;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type SubscriptionChangeRequest = z.output<typeof SubscriptionChangeRequest>;
|
|
97
|
+
/**
|
|
98
|
+
* What a caller may ask a quote about — {@link SubscriptionChangeRequest} itself, under the name the
|
|
99
|
+
* preview route line reads with.
|
|
100
|
+
*
|
|
101
|
+
* **The same value, not a copy of it.** A preview is the change with the commit removed: it asks the
|
|
102
|
+
* provider what moving to this product would cost and takes nothing. Two objects that must stay
|
|
103
|
+
* identical are two objects that will not — and the shape of that drift is a preview accepting a field
|
|
104
|
+
* the change refuses, quoting a customer a figure the commit then cannot honor. `schemas.test.ts`
|
|
105
|
+
* asserts the identity, so this stays an alias rather than becoming a second declaration.
|
|
106
|
+
*/
|
|
107
|
+
export declare const SubscriptionPreviewRequest: z.ZodObject<{
|
|
108
|
+
productId: z.ZodString;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type SubscriptionPreviewRequest = SubscriptionChangeRequest;
|
|
111
|
+
/**
|
|
112
|
+
* When a cancellation takes effect. One field, and it is the customer's word rather than the store's.
|
|
113
|
+
*
|
|
114
|
+
* **Required, with no default.** `at_period_end` is the settled policy, and a default is still the
|
|
115
|
+
* wrong shape for it: the two timings are different things to buy — keep the period already paid for,
|
|
116
|
+
* or lose it today — and a body that omits the field would be choosing one of them by silence. A caller
|
|
117
|
+
* that means `at_period_end` says so, which is also what an audit row then records.
|
|
118
|
+
*
|
|
119
|
+
* The values come from `data/subscription.ts` rather than being spelled again here, so a third timing
|
|
120
|
+
* cannot exist on the wire and not in the rail. Paddle's own `immediately` and `next_billing_period` do
|
|
121
|
+
* not parse: the rail translates, and a request in the store's vocabulary means something upstream
|
|
122
|
+
* stopped translating.
|
|
123
|
+
*/
|
|
124
|
+
export declare const SubscriptionCancelRequest: z.ZodObject<{
|
|
125
|
+
timing: z.ZodEnum<{
|
|
126
|
+
at_period_end: "at_period_end";
|
|
127
|
+
now: "now";
|
|
128
|
+
}>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type SubscriptionCancelRequest = z.output<typeof SubscriptionCancelRequest>;
|
|
131
|
+
/**
|
|
132
|
+
* The terms of a discount to mint. The one control-plane write that creates an object costing money.
|
|
133
|
+
*
|
|
134
|
+
* `DiscountTerms` carries the whole shape and its own cross-field rules — a repeating duration must state
|
|
135
|
+
* the plan's billing interval, because Stripe counts months and Lemon Squeezy counts periods. The rail is
|
|
136
|
+
* named here rather than inferred: minting is an administrative act against one store's dashboard, and
|
|
137
|
+
* guessing which one would put a code where nobody was looking for it.
|
|
138
|
+
*/
|
|
139
|
+
export declare const AdminDiscountsQuery: z.ZodObject<{
|
|
140
|
+
rail: z.ZodEnum<{
|
|
141
|
+
lemonSqueezy: "lemonSqueezy";
|
|
142
|
+
paddle: "paddle";
|
|
143
|
+
stripe: "stripe";
|
|
144
|
+
}>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export type AdminDiscountsQuery = z.infer<typeof AdminDiscountsQuery>;
|
|
147
|
+
export declare const DiscountCreateRequest: z.ZodObject<{
|
|
148
|
+
rail: z.ZodEnum<{
|
|
149
|
+
lemonSqueezy: "lemonSqueezy";
|
|
150
|
+
paddle: "paddle";
|
|
151
|
+
stripe: "stripe";
|
|
152
|
+
}>;
|
|
153
|
+
terms: z.ZodObject<{
|
|
154
|
+
code: z.ZodOptional<z.ZodString>;
|
|
155
|
+
amount: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"percent">;
|
|
157
|
+
percent: z.ZodNumber;
|
|
158
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
159
|
+
kind: z.ZodLiteral<"fixed">;
|
|
160
|
+
amountMinor: z.ZodNumber;
|
|
161
|
+
currency: z.ZodString;
|
|
162
|
+
}, z.core.$strict>], "kind">;
|
|
163
|
+
duration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
164
|
+
kind: z.ZodLiteral<"once">;
|
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
+
kind: z.ZodLiteral<"forever">;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
kind: z.ZodLiteral<"repeating">;
|
|
169
|
+
billingPeriods: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>], "kind">;
|
|
171
|
+
billingInterval: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
month: "month";
|
|
173
|
+
year: "year";
|
|
174
|
+
}>>;
|
|
175
|
+
maxRedemptions: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
redeemableUntil: z.ZodOptional<z.ZodCodec<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodDate]>, z.ZodDate>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
export type DiscountCreateRequest = z.input<typeof DiscountCreateRequest>;
|
|
180
|
+
/**
|
|
181
|
+
* Google's webhook body: a Pub/Sub push, not a Play notification.
|
|
182
|
+
*
|
|
183
|
+
* The Google rail declares the same shape for itself, for the reason Apple's does — it decodes the bytes in order
|
|
184
|
+
* to check them and must not import across the HTTP seam to do it. Change one, change the other.
|
|
185
|
+
*
|
|
186
|
+
* **The proof is not in here.** A Pub/Sub push body carries no signature at all: authenticity is the OIDC token
|
|
187
|
+
* in the `Authorization` header, which the guard has already verified by the time a handler reads this. So this
|
|
188
|
+
* validator's job is only to say the body is shaped like a push, which is what keeps a malformed one a 400 rather
|
|
189
|
+
* than something a handler has to defend against.
|
|
190
|
+
*/
|
|
191
|
+
export declare const GoogleWebhookNotification: z.ZodObject<{
|
|
192
|
+
message: z.ZodObject<{
|
|
193
|
+
data: z.ZodString;
|
|
194
|
+
messageId: z.ZodString;
|
|
195
|
+
publishTime: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$loose>;
|
|
197
|
+
subscription: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$loose>;
|
|
199
|
+
export type GoogleWebhookNotification = z.infer<typeof GoogleWebhookNotification>;
|
|
200
|
+
/**
|
|
201
|
+
* Stripe's webhook body: an event envelope.
|
|
202
|
+
*
|
|
203
|
+
* Shape-only, like Google's. **The proof is not in here** — it is the HMAC in the `Stripe-Signature` header, which
|
|
204
|
+
* the guard has already checked against the exact received bytes by the time a handler reads this. So this
|
|
205
|
+
* validator's job is to say the body is shaped like an event, which keeps a malformed one a 400 rather than
|
|
206
|
+
* something a handler has to defend against. The Stripe rail declares the same shape for itself, in
|
|
207
|
+
* `rails/stripe/objects.ts`, because it parses the bytes in order to read them and must not import across the
|
|
208
|
+
* HTTP seam. Change one, change the other.
|
|
209
|
+
*/
|
|
210
|
+
export declare const StripeWebhookNotification: z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
type: z.ZodString;
|
|
213
|
+
created: z.ZodNumber;
|
|
214
|
+
data: z.ZodObject<{
|
|
215
|
+
object: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
216
|
+
}, z.core.$loose>;
|
|
217
|
+
}, z.core.$loose>;
|
|
218
|
+
export type StripeWebhookNotification = z.infer<typeof StripeWebhookNotification>;
|
|
219
|
+
/**
|
|
220
|
+
* Lemon Squeezy's webhook body: a JSON:API envelope with the event name in `meta`.
|
|
221
|
+
*
|
|
222
|
+
* The rail declares the same shape for itself, for the reason Apple's and Google's do — it reads the bytes in
|
|
223
|
+
* order to check them and must not import across the HTTP seam to do it. Change one, change the other.
|
|
224
|
+
*
|
|
225
|
+
* **The proof is not in here.** Authenticity is the bare HMAC in `X-Signature`, which the guard has verified
|
|
226
|
+
* over the exact received bytes before this validator parses anything. So this validator's job is only to say
|
|
227
|
+
* the body is shaped like a delivery, which keeps a malformed one a 400 rather than something a handler has to
|
|
228
|
+
* defend against.
|
|
229
|
+
*/
|
|
230
|
+
export declare const LemonSqueezyWebhookNotification: z.ZodObject<{
|
|
231
|
+
meta: z.ZodObject<{
|
|
232
|
+
event_name: z.ZodString;
|
|
233
|
+
}, z.core.$loose>;
|
|
234
|
+
data: z.ZodObject<{
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
type: z.ZodString;
|
|
237
|
+
}, z.core.$loose>;
|
|
238
|
+
}, z.core.$loose>;
|
|
239
|
+
export type LemonSqueezyWebhookNotification = z.infer<typeof LemonSqueezyWebhookNotification>;
|
|
240
|
+
/**
|
|
241
|
+
* Paddle's webhook body: an event envelope carrying its own id, its type, when it happened, and the entity.
|
|
242
|
+
*
|
|
243
|
+
* The rail declares the same shape for itself, for the reason every other rail's does — it reads the bytes
|
|
244
|
+
* in order to check them and must not import across the HTTP seam to do it. Change one, change the other.
|
|
245
|
+
*
|
|
246
|
+
* **The proof is not in here.** Authenticity is the timestamped HMAC in `Paddle-Signature`, which the guard
|
|
247
|
+
* has verified over the exact received bytes before this validator parses anything. So this validator's job
|
|
248
|
+
* is only to say the body is shaped like a delivery, which keeps a malformed one a 400 rather than something
|
|
249
|
+
* a handler has to defend against.
|
|
250
|
+
*/
|
|
251
|
+
export declare const PaddleWebhookNotification: z.ZodObject<{
|
|
252
|
+
event_id: z.ZodString;
|
|
253
|
+
event_type: z.ZodString;
|
|
254
|
+
occurred_at: z.ZodString;
|
|
255
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
256
|
+
}, z.core.$loose>;
|
|
257
|
+
export type PaddleWebhookNotification = z.infer<typeof PaddleWebhookNotification>;
|
|
258
|
+
/**
|
|
259
|
+
* A control-plane grant: who, which entitlement, and for how long.
|
|
260
|
+
*
|
|
261
|
+
* One of the two places in this package where a subject is a request field, and the only reason it is legal
|
|
262
|
+
* is the gate ahead of it — a manual grant is support acting on somebody else's holding, so naming that
|
|
263
|
+
* holder is the whole point. Every player-facing route resolves the subject on the server precisely because
|
|
264
|
+
* a body that could name one would let any signed-in caller write against another. Here that power *is* the
|
|
265
|
+
* feature, which is why the route requires a default-denied scoped control-plane credential and audits the
|
|
266
|
+
* write.
|
|
267
|
+
*
|
|
268
|
+
* **Both halves, and the type is named rather than assumed.** The row this writes is keyed
|
|
269
|
+
* `(subjectType, subjectId, entitlement)` and is read back by the same pair, so a grant that carried an id
|
|
270
|
+
* alone would land on whichever holder shares it. Whether the named kind is the one this project bills is a
|
|
271
|
+
* config-backed question and stays where the entitlement key's own catalog check is, in the handler: a
|
|
272
|
+
* schema constrains a string, it never replaces a lookup.
|
|
273
|
+
*
|
|
274
|
+
* No product, no rail, no price. A manual grant is not a purchase and must not pretend to be one: it writes
|
|
275
|
+
* the read model directly, with null provenance, and the purchase record stays empty because nothing was
|
|
276
|
+
* bought.
|
|
277
|
+
*/
|
|
278
|
+
export declare const EntitlementGrantRequest: z.ZodObject<{
|
|
279
|
+
subjectType: z.ZodEnum<{
|
|
280
|
+
organization: "organization";
|
|
281
|
+
user: "user";
|
|
282
|
+
}>;
|
|
283
|
+
subjectId: z.ZodString;
|
|
284
|
+
entitlement: z.ZodString;
|
|
285
|
+
expiresAt: z.ZodOptional<z.ZodCodec<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodDate]>, z.ZodDate>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export type EntitlementGrantRequest = z.output<typeof EntitlementGrantRequest>;
|
|
288
|
+
/**
|
|
289
|
+
* A control-plane revoke: who, and which entitlement.
|
|
290
|
+
*
|
|
291
|
+
* No expiry, because a revoke is immediate — the read model is the truth every gate hits, so the subject
|
|
292
|
+
* loses access on the next request rather than at the end of a period. Revoking a key the subject never held
|
|
293
|
+
* is legal and idempotent: the inactive row is itself the record that somebody decided it.
|
|
294
|
+
*/
|
|
295
|
+
export declare const EntitlementRevokeRequest: z.ZodObject<{
|
|
296
|
+
subjectType: z.ZodEnum<{
|
|
297
|
+
organization: "organization";
|
|
298
|
+
user: "user";
|
|
299
|
+
}>;
|
|
300
|
+
subjectId: z.ZodString;
|
|
301
|
+
entitlement: z.ZodString;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
export type EntitlementRevokeRequest = z.output<typeof EntitlementRevokeRequest>;
|
|
304
|
+
export declare const AdminPurchasesQuery: z.ZodObject<{
|
|
305
|
+
subjectType: z.ZodOptional<z.ZodEnum<{
|
|
306
|
+
organization: "organization";
|
|
307
|
+
user: "user";
|
|
308
|
+
}>>;
|
|
309
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
310
|
+
rail: z.ZodOptional<z.ZodEnum<{
|
|
311
|
+
apple: "apple";
|
|
312
|
+
google: "google";
|
|
313
|
+
lemonSqueezy: "lemonSqueezy";
|
|
314
|
+
paddle: "paddle";
|
|
315
|
+
stripe: "stripe";
|
|
316
|
+
}>>;
|
|
317
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
active: "active";
|
|
319
|
+
canceled: "canceled";
|
|
320
|
+
expired: "expired";
|
|
321
|
+
in_grace: "in_grace";
|
|
322
|
+
never_paid: "never_paid";
|
|
323
|
+
on_hold: "on_hold";
|
|
324
|
+
paused: "paused";
|
|
325
|
+
refunded: "refunded";
|
|
326
|
+
revoked: "revoked";
|
|
327
|
+
}>>;
|
|
328
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
production: "production";
|
|
330
|
+
sandbox: "sandbox";
|
|
331
|
+
}>>;
|
|
332
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
333
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
export type AdminPurchasesQuery = z.output<typeof AdminPurchasesQuery>;
|
|
336
|
+
export declare const AdminSubscriptionsQuery: z.ZodObject<{
|
|
337
|
+
subjectType: z.ZodOptional<z.ZodEnum<{
|
|
338
|
+
organization: "organization";
|
|
339
|
+
user: "user";
|
|
340
|
+
}>>;
|
|
341
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
342
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
active: "active";
|
|
344
|
+
canceled: "canceled";
|
|
345
|
+
expired: "expired";
|
|
346
|
+
in_grace: "in_grace";
|
|
347
|
+
never_paid: "never_paid";
|
|
348
|
+
on_hold: "on_hold";
|
|
349
|
+
paused: "paused";
|
|
350
|
+
refunded: "refunded";
|
|
351
|
+
revoked: "revoked";
|
|
352
|
+
}>>;
|
|
353
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
354
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
export type AdminSubscriptionsQuery = z.output<typeof AdminSubscriptionsQuery>;
|
|
357
|
+
export declare const AdminEntitlementsQuery: z.ZodObject<{
|
|
358
|
+
subjectType: z.ZodOptional<z.ZodEnum<{
|
|
359
|
+
organization: "organization";
|
|
360
|
+
user: "user";
|
|
361
|
+
}>>;
|
|
362
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
363
|
+
entitlement: z.ZodOptional<z.ZodString>;
|
|
364
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
365
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
366
|
+
}, z.core.$strip>;
|
|
367
|
+
export type AdminEntitlementsQuery = z.output<typeof AdminEntitlementsQuery>;
|
|
368
|
+
export declare const AdminReconcileRunsQuery: z.ZodObject<{
|
|
369
|
+
rail: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
apple: "apple";
|
|
371
|
+
google: "google";
|
|
372
|
+
lemonSqueezy: "lemonSqueezy";
|
|
373
|
+
paddle: "paddle";
|
|
374
|
+
stripe: "stripe";
|
|
375
|
+
}>>;
|
|
376
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
production: "production";
|
|
378
|
+
sandbox: "sandbox";
|
|
379
|
+
}>>;
|
|
380
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
381
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
382
|
+
}, z.core.$strip>;
|
|
383
|
+
export type AdminReconcileRunsQuery = z.output<typeof AdminReconcileRunsQuery>;
|
|
384
|
+
/**
|
|
385
|
+
* The two path segments on the per-subject management read: `…/entitlements/:subjectType/:subjectId`.
|
|
386
|
+
*
|
|
387
|
+
* **Two segments, not one encoded reference.** `encodeSubjectReference` exists for the single-field slots a
|
|
388
|
+
* store gives us — Apple's `appAccountToken`, Stripe's `client_reference_id` — where there is exactly one
|
|
389
|
+
* string to write and it comes back through a webhook. A URL has as many segments as it needs, and the
|
|
390
|
+
* decoder for that wire format answers `undefined` for anything it does not recognize, which on a path
|
|
391
|
+
* would be a 404 that reads like a missing holder rather than the 400 a malformed address deserves. Two
|
|
392
|
+
* validated segments say which half is wrong.
|
|
393
|
+
*
|
|
394
|
+
* Neither is optional, because half an address is not a narrower read: it is a different holder.
|
|
395
|
+
*/
|
|
396
|
+
export declare const AdminSubjectParam: z.ZodObject<{
|
|
397
|
+
subjectType: z.ZodEnum<{
|
|
398
|
+
organization: "organization";
|
|
399
|
+
user: "user";
|
|
400
|
+
}>;
|
|
401
|
+
subjectId: z.ZodString;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
export type AdminSubjectParam = z.output<typeof AdminSubjectParam>;
|
|
404
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/http/schemas.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4DxB,eAAO,MAAM,kBAAkB;;;;;;;;;iBAa5B,CAAC;AACJ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;iBAaqF,CAAC;AACjH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;iBAS4D,CAAC;AAClG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;iBAgBoD,CAAC;AACjF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB;;iBAUiD,CAAC;AACxF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEnF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B;;iBAA4B,CAAC;AACpE,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB;;;;;iBAMoC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEnF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;;iBAM8C,CAAC;AAC/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO2B,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;;;iBAuBoC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB;;;;;;;iBAW4B,CAAC;AACnE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;iBAiB6B,CAAC;AAC1E,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE9F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;iBAQ6B,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;iBAeuE,CAAC;AAC5G,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAUoE,CAAC;AAC1G,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAmEjF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYiD,CAAC;AAClF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEvE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;iBAYjC,CAAC;AACJ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E,eAAO,MAAM,sBAAsB;;;;;;;;;iBAU6C,CAAC;AACjF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE7E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;iBAWmD,CAAC;AACxF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB;;;;;;iBASgE,CAAC;AAC/F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|