@softure-ai/billing 0.1.6 → 0.1.8
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/CHANGELOG.md +22 -0
- package/README.md +75 -16
- package/dist/contract.d.ts +19 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +1 -0
- package/dist/contract.js.map +1 -1
- package/dist/fields.d.ts +2 -0
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +2 -0
- package/dist/fields.js.map +1 -1
- package/dist/index.d.ts +19 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mailing/reminder-mail.d.ts +8 -2
- package/dist/mailing/reminder-mail.d.ts.map +1 -1
- package/dist/mailing/reminder-mail.js +6 -1
- package/dist/mailing/reminder-mail.js.map +1 -1
- package/dist/messages/en.d.ts +17 -0
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +17 -0
- package/dist/messages/en.js.map +1 -1
- package/dist/messages/index.d.ts +36 -2
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js.map +1 -1
- package/dist/messages/pl.d.ts.map +1 -1
- package/dist/messages/pl.js +17 -0
- package/dist/messages/pl.js.map +1 -1
- package/dist/next/actions.d.ts +8 -1
- package/dist/next/actions.d.ts.map +1 -1
- package/dist/next/actions.js +37 -1
- package/dist/next/actions.js.map +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.d.ts.map +1 -1
- package/dist/next/index.js +1 -1
- package/dist/next/index.js.map +1 -1
- package/dist/next/pages.d.ts +13 -3
- package/dist/next/pages.d.ts.map +1 -1
- package/dist/next/pages.js +25 -8
- package/dist/next/pages.js.map +1 -1
- package/dist/schema.d.ts +109 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +10 -2
- package/dist/schema.js.map +1 -1
- package/dist/scripts/entitlement-scripts.d.ts +2 -0
- package/dist/scripts/entitlement-scripts.d.ts.map +1 -1
- package/dist/scripts/entitlement-scripts.js +17 -5
- package/dist/scripts/entitlement-scripts.js.map +1 -1
- package/dist/server/entitlements.d.ts +23 -6
- package/dist/server/entitlements.d.ts.map +1 -1
- package/dist/server/entitlements.js +37 -6
- package/dist/server/entitlements.js.map +1 -1
- package/dist/server/grants.d.ts +13 -2
- package/dist/server/grants.d.ts.map +1 -1
- package/dist/server/grants.js +11 -2
- package/dist/server/grants.js.map +1 -1
- package/dist/server/health.d.ts.map +1 -1
- package/dist/server/health.js +2 -1
- package/dist/server/health.js.map +1 -1
- package/dist/server/index.d.ts +3 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/privacy.d.ts +9 -0
- package/dist/server/privacy.d.ts.map +1 -1
- package/dist/server/privacy.js +19 -6
- package/dist/server/privacy.js.map +1 -1
- package/dist/server/trials.d.ts +22 -0
- package/dist/server/trials.d.ts.map +1 -0
- package/dist/server/trials.js +60 -0
- package/dist/server/trials.js.map +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/trial-form.d.ts +16 -0
- package/dist/ui/trial-form.d.ts.map +1 -0
- package/dist/ui/trial-form.js +25 -0
- package/dist/ui/trial-form.js.map +1 -0
- package/migrations/0010_record_trial_extensions_and_index_foreign_keys.sql +27 -0
- package/module.json +2 -2
- package/package.json +1 -1
- package/src/contract.ts +28 -0
- package/src/fields.ts +2 -0
- package/src/index.ts +7 -3
- package/src/mailing/reminder-mail.ts +14 -3
- package/src/messages/en.ts +17 -0
- package/src/messages/index.ts +2 -2
- package/src/messages/pl.ts +17 -0
- package/src/next/actions.ts +35 -2
- package/src/next/index.ts +9 -1
- package/src/next/pages.tsx +41 -6
- package/src/schema.ts +11 -2
- package/src/scripts/entitlement-scripts.ts +18 -5
- package/src/server/entitlements.ts +60 -6
- package/src/server/grants.ts +24 -3
- package/src/server/health.ts +2 -1
- package/src/server/index.ts +3 -0
- package/src/server/privacy.ts +29 -6
- package/src/server/trials.ts +70 -0
- package/src/ui/index.ts +1 -0
- package/src/ui/trial-form.tsx +80 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ Newest first. Each version lists what changed for an app that uses `@softure-ai/
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done"). Versions before the first one below are described in their GitHub Releases (`billing@x.y.z`).
|
|
6
6
|
|
|
7
|
+
## 0.1.8
|
|
8
|
+
|
|
9
|
+
- `BillingAdminPage` has an "Extend a trial" card: the account's email and the trial's new last day.
|
|
10
|
+
`extendTrialAction` (`/next`) and `extendTrialManually(ctx, { userId, until, adminId })` (`/server`) move the
|
|
11
|
+
trial end later without writing `paid_until`, and record it in the new `billing.trial_extensions`, listed in the
|
|
12
|
+
account's history (`AccountHistoryEntry` source `trial`). New codes `billing.trial_not_extended` and
|
|
13
|
+
`billing.day_invalid`; new `TrialForm` (`/ui`), `TrialFormState`, `TrialFormErrorCode`, `TrialExtensionErrorCode`.
|
|
14
|
+
- `importEntitlement(ctx, { ...input, mode: "replace" })` and `import-entitlements --exact` store what the old system
|
|
15
|
+
knew exactly, a trial shorter than the derived one included, for accounts that have no entitlement row yet; a
|
|
16
|
+
different existing row is `billing.entitlement_exists` (the script refuses the whole file), the same one is a
|
|
17
|
+
no-op. The default merge is unchanged.
|
|
18
|
+
- `PaymentPage` and `BillingAdminPage` render an `<h1>` first in their `<main>` (messages `payment.heading`,
|
|
19
|
+
`admin.heading`); `heading` replaces it, `heading={null}` leaves it out for an app whose frame has its own.
|
|
20
|
+
- Migration `0010`: `billing.trial_extensions`, and indexes behind the foreign keys `payment_requests.user_id`,
|
|
21
|
+
`manual_grants.granted_by` and `manual_grants.revoked_by`. Run `softure migrate`.
|
|
22
|
+
- The privacy export carries `trialExtensions` (`extendedAt`, `previousEndsAt`, `endsAt`); deletion erases them.
|
|
23
|
+
|
|
24
|
+
## 0.1.7
|
|
25
|
+
|
|
26
|
+
- `sendAccessReminders` stops at a refused mail account or a spent quota (mailing's `halted`, counted in
|
|
27
|
+
`retryLater`) and skips a reminder whose send was interrupted long ago (mailing's `uncertain`, counted in `skipped`).
|
|
28
|
+
|
|
7
29
|
## 0.1.6
|
|
8
30
|
|
|
9
31
|
- `module.json` names `mailing` and `ops` as optional dependencies.
|
package/README.md
CHANGED
|
@@ -32,8 +32,10 @@ import of what the old system knew (`import-entitlements`) and a pin step for de
|
|
|
32
32
|
period copy follow the app's locale.
|
|
33
33
|
- **`PricingTiles`** (`/ui`) and **`Pricing`** (`/next`, wired to the config), a **`PaymentPage`**
|
|
34
34
|
to mount at `routes.payment`, and a **`BillingAdminPage`** at `routes.admin` where an admin
|
|
35
|
-
works the open invoice requests (grant or dismiss each), grants a plan by email,
|
|
36
|
-
|
|
35
|
+
works the open invoice requests (grant or dismiss each), grants a plan by email, extends a trial
|
|
36
|
+
for free (never written as paid access), and looks up an account's history of grants, trial
|
|
37
|
+
extensions and payments with a revoke button on each manual grant. Both pages render an `<h1>`
|
|
38
|
+
first in their `<main>` (see "Page headings" in §4).
|
|
37
39
|
- **A `PaymentProvider` interface** and its first adapter, **`manual({ onRequest })`**: the buyer
|
|
38
40
|
requests an invoice, the app hands the request to its owner (a mail, a ticket), and the owner
|
|
39
41
|
grants the plan once it is paid. The request is stored in `billing.payment_requests` before it is
|
|
@@ -55,10 +57,11 @@ import of what the old system knew (`import-entitlements`) and a pin step for de
|
|
|
55
57
|
the account's history like the admin page's (see "Scripts" in §4).
|
|
56
58
|
- **Existing accounts**: `trial.startsAt` gives accounts created before a chosen day a trial from
|
|
57
59
|
that day; `import-entitlements` (`importEntitlement()` on the server) records the trial ends, paid
|
|
58
|
-
periods and lifetime access another system knew, never shortening access
|
|
60
|
+
periods and lifetime access another system knew, never shortening access, or with `--exact`
|
|
61
|
+
(`mode: "replace"`) exactly as it knew them for accounts billing has no row of yet; `pin-trials`
|
|
59
62
|
(`pinDerivedTrials()`) writes every derived trial into a row before a config change would move it
|
|
60
63
|
(see "Existing accounts" in §4).
|
|
61
|
-
- Export and deletion of the entitlement row, the payments, the invoice requests
|
|
64
|
+
- Export and deletion of the entitlement row, the payments, the invoice requests, the manual grants and the trial extensions (`@softure-ai/privacy`), and a health check for
|
|
62
65
|
`GET /api/health`.
|
|
63
66
|
|
|
64
67
|
## 2. Installation
|
|
@@ -176,6 +179,19 @@ export { BillingAdminPage as default } from "@softure-ai/billing/next";
|
|
|
176
179
|
export { stripeWebhookRoute as POST } from "@softure-ai/billing/next";
|
|
177
180
|
```
|
|
178
181
|
|
|
182
|
+
**Page headings.** Each page renders one `<h1>` as the first child of its `<main>`: the
|
|
183
|
+
`payment.heading` and `admin.heading` messages ("Payment", "Billing"). Pass `heading` to replace
|
|
184
|
+
it, or `heading={null}` when the app's own frame renders the page heading:
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
// app/admin/billing/page.tsx, inside the app's frame that has its own <h1>
|
|
188
|
+
import { BillingAdminPage, type BillingAdminPageProps } from "@softure-ai/billing/next";
|
|
189
|
+
|
|
190
|
+
export default function Page(props: BillingAdminPageProps) {
|
|
191
|
+
return <BillingAdminPage {...props} heading={null} />;
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
179
195
|
**The Stripe webhook.** In the Stripe dashboard, add an endpoint at `<appOrigin>/api/billing/webhook`
|
|
180
196
|
for `checkout.session.completed`, `checkout.session.async_payment_succeeded`, `charge.refunded` and
|
|
181
197
|
`refund.failed`, and put its signing secret in `STRIPE_WEBHOOK_SECRET` (locally: `stripe listen --forward-to
|
|
@@ -273,7 +289,7 @@ sees that it has nothing left to pay for instead of the order (`startPayment` re
|
|
|
273
289
|
`<Pricing LinkComponent={Link} />`.
|
|
274
290
|
|
|
275
291
|
**The admin page.** `BillingAdminPage` answers "not found" to anyone without `adminRole`; every
|
|
276
|
-
action checks the role from the session again before reading its form. It has
|
|
292
|
+
action checks the role from the session again before reading its form. It has four cards:
|
|
277
293
|
|
|
278
294
|
- **Invoice requests**: the open requests, oldest first, with the account, the plan, when it was
|
|
279
295
|
asked for, the price it quoted and the invoice details (the latest ones: a buyer who asks again
|
|
@@ -283,9 +299,18 @@ action checks the role from the session again before reading its form. It has th
|
|
|
283
299
|
- **Grant access**: a plan for the account with a given email, recorded like a request's grant.
|
|
284
300
|
An account with lifetime access is refused (`billing.lifetime_active`): a dated period under
|
|
285
301
|
lifetime would be invisible.
|
|
302
|
+
- **Extend a trial**: the account's email and the trial's new last day (a date field; the trial
|
|
303
|
+
ends when the next day begins in the app's time zone). `extendTrialAction` calls
|
|
304
|
+
`extendTrialManually(ctx, { userId, until, adminId })` (`/server`), which moves the trial end
|
|
305
|
+
later and records it in `billing.trial_extensions` with the end before and after. It never writes
|
|
306
|
+
`paid_until`, so an app that counts paying accounts by it does not count a free extension (an
|
|
307
|
+
invited user, a longer trial for an account). It works under paid access too (paid access still
|
|
308
|
+
comes first; the longer trial shows once it ends) and on a trial that already ended. An end at or
|
|
309
|
+
before now is `billing.end_not_in_future`, one at or before the current trial end
|
|
310
|
+
`billing.trial_not_extended`, a malformed day `billing.day_invalid`; a refusal writes nothing.
|
|
286
311
|
- **Account history**: the email lookup sends the admin to `?account=<id>` (no address in a URL),
|
|
287
|
-
which shows the account's badge and its manual grants and provider payments,
|
|
288
|
-
with its price, the access it added and its state. **Revoke** on an active manual grant takes back only
|
|
312
|
+
which shows the account's badge and its manual grants, trial extensions and provider payments,
|
|
313
|
+
newest first, each with its price, the access it added and its state. **Revoke** on an active manual grant takes back only
|
|
289
314
|
what it added, like a refund: a period loses its unused days and the periods stored after it
|
|
290
315
|
(manual or paid) move back; a lifetime ends unless another active manual lifetime or a paid
|
|
291
316
|
lifetime payment still gives it. Provider payments are refunded at the provider, not here.
|
|
@@ -439,7 +464,7 @@ older than `trial.days` read-only at once. Three tools, in this order, keep thei
|
|
|
439
464
|
that local day gets its `trial.days` from it, on every read, without a write; accounts created on
|
|
440
465
|
or after it keep their own trial. The reminder mail sees the floored trials too, so all those
|
|
441
466
|
accounts get their trial-ending mail in the same window.
|
|
442
|
-
2. **An import** of what the old system knew (
|
|
467
|
+
2. **An import** of what the old system knew (e.g. its `trial_ends_at`, `paid_until` columns):
|
|
443
468
|
|
|
444
469
|
```ts
|
|
445
470
|
// scripts/import-entitlements.ts: npm run import-entitlements -- --file=entitlements.json [--commit]
|
|
@@ -474,6 +499,16 @@ older than `trial.days` read-only at once. Three tools, in this order, keep thei
|
|
|
474
499
|
large file: every row takes its locks until the end of the run. `importEntitlement(ctx, { userId,
|
|
475
500
|
trialEndsAt?, paidUntil?, isLifetime? })` (`/server`) is the same merge for an app that migrates in
|
|
476
501
|
its own code; it returns the `Entitlement` or `Err<billing.account_unknown>`.
|
|
502
|
+
|
|
503
|
+
**An exact import** (`--exact`, `importEntitlement(ctx, { ...row, mode: "replace" })`) stores each
|
|
504
|
+
row as given instead: when the old system had shortened access (a trial counted from a later day
|
|
505
|
+
than `created_at`, a revoked purchase), a merge would give the account back its longer derived
|
|
506
|
+
trial, the exact import keeps it ended. `trialEndsAt` omitted or `null` keeps the derived trial,
|
|
507
|
+
`paidUntil` `null` means none. It writes only an account's first row: an account that already has
|
|
508
|
+
one (a change, a pin) is refused with `billing.entitlement_exists`, unless its row holds exactly
|
|
509
|
+
that record, so running the same file again changes nothing. The script refuses the whole file,
|
|
510
|
+
naming the rows, when any account already has a different row. Run it before anything writes
|
|
511
|
+
rows (before `pin-trials` and before the app opens billing to its accounts).
|
|
477
512
|
3. **A pin** before any change of `trial.days`, `trial.startsAt` or `config.timezone`:
|
|
478
513
|
`npm run pin-trials [-- --commit]` (`createPinTrialsScript(config)`, no arguments) writes the trial
|
|
479
514
|
every account without a row is on, exactly as reads derive it, into a row, so the change moves no
|
|
@@ -589,6 +624,20 @@ again refreshes its details and time.
|
|
|
589
624
|
| `status`, `revoked_at` | `active` or `revoked`; CHECKs tie `revoked_at` and `revoked_by` to the status. |
|
|
590
625
|
| `amount`, `currency` | What it was granted for (`0006`): the price its request quoted, else the plan's price when granted; NULL on rows stored before. |
|
|
591
626
|
|
|
627
|
+
`migrations/0010_record_trial_extensions_and_index_foreign_keys.sql` creates
|
|
628
|
+
`billing.trial_extensions`, one row per trial an admin extended:
|
|
629
|
+
|
|
630
|
+
| Column | Meaning |
|
|
631
|
+
| --- | --- |
|
|
632
|
+
| `id`, `user_id` | The extension and its account (`ON DELETE CASCADE`). |
|
|
633
|
+
| `extended_by` | The admin (`ON DELETE SET NULL`); NULL for one made without an admin. |
|
|
634
|
+
| `extended_at` | When it was extended. |
|
|
635
|
+
| `previous_ends_at`, `ends_at` | The trial end before and after (CHECK: later, and after `extended_at`). |
|
|
636
|
+
|
|
637
|
+
It also indexes the foreign keys `payment_requests.user_id`, `manual_grants.granted_by` and
|
|
638
|
+
`manual_grants.revoked_by` (partial, `IS NOT NULL`), so deleting an account or an admin does not
|
|
639
|
+
scan those tables; every billing foreign key now has an index that starts with its column.
|
|
640
|
+
|
|
592
641
|
A grant and the request it closes share a transaction; a grant and a revoke take the account, then
|
|
593
642
|
the entitlement, then their row (a conditional update), the order of a refund.
|
|
594
643
|
|
|
@@ -620,9 +669,9 @@ tile gets `--sft-border-strong` and a shadow, and sets `data-plan`, `data-featur
|
|
|
620
669
|
`billingMessages` (`en`, `pl`): `badge` (status names, `daysLeft` plural forms, `until`), `notice`
|
|
621
670
|
(the four notices and their two link texts), `pricing` (period plural forms per unit, `lifetime`,
|
|
622
671
|
`featured`, `choose`, `empty`), `reminderMail` (`subject` and `body` of `trialEnding`,
|
|
623
|
-
`paidEnding`, `trialEnded` and `paidEnded`; the link text is the notice's), `payment` (the payment page
|
|
624
|
-
hosted checkout, `checkoutSuccess` and `checkoutCancelled`), `admin` (the
|
|
625
|
-
grant form) and `errors`. Plan names, descriptions and features come from the config, per locale. `{date}` is the last day of access in
|
|
672
|
+
`paidEnding`, `trialEnded` and `paidEnded`; the link text is the notice's), `payment` (the payment page and its `heading`, the invoice form and the notices after a
|
|
673
|
+
hosted checkout, `checkoutSuccess` and `checkoutCancelled`), `admin` (the page's `heading`, the
|
|
674
|
+
grant form, `trial` for the trial form, `requests`, `history`) and `errors`. Plan names, descriptions and features come from the config, per locale. `{date}` is the last day of access in
|
|
626
675
|
the app's locale and time zone, `{count}` the days left. Override them with
|
|
627
676
|
`billing({ messages: { en: { notice: { choosePlan: "See plans" } } } })`.
|
|
628
677
|
|
|
@@ -630,7 +679,17 @@ the app's locale and time zone, `{count}` the days left. Override them with
|
|
|
630
679
|
|
|
631
680
|
`manual({ onRequest(request, ctx) })` receives every invoice request (plan, account, invoice
|
|
632
681
|
details, return URL) and resolves with `Ok` once handed over, or an `Err` the buyer sees as
|
|
633
|
-
`billing.payment_failed`.
|
|
682
|
+
`billing.payment_failed`. Mailing the request to the operator with the buyer as the reply-to
|
|
683
|
+
(`@softure-ai/mailing` 0.1.10 or later) lets the operator answer the buyer with "Reply":
|
|
684
|
+
|
|
685
|
+
```ts
|
|
686
|
+
payment: manual({
|
|
687
|
+
onRequest: async (request, ctx) => {
|
|
688
|
+
const sent = await sendMail(ctx, { to: OPERATOR, replyTo: request.account.email, subject: `Invoice request: ${request.plan.id}`, text: describeRequest(request) });
|
|
689
|
+
return sent.ok ? ok() : err(sent.error);
|
|
690
|
+
},
|
|
691
|
+
}),
|
|
692
|
+
``` Apps react to a change in their own code around `changeEntitlement` and
|
|
634
693
|
`grantPlan`. The Stripe webhook has no hook yet; its effect shows in `getEntitlement`.
|
|
635
694
|
|
|
636
695
|
## 11. GDPR
|
|
@@ -642,10 +701,10 @@ details, return URL) and resolves with `Ok` once handed over, or an `Err` the bu
|
|
|
642
701
|
failed (`paymentId`, `refundId`, `amount`, `refundCreatedAt`, `failedAt`), its invoice requests (`planId`, the
|
|
643
702
|
invoice details while open, `amount`, `currency`, `status`, `requestedAt`, `closedAt`) and the
|
|
644
703
|
plans granted to it by hand (`planId`, `grantedAt`, the grant, `status`, `revokedAt`, `amount`,
|
|
645
|
-
`currency`)
|
|
646
|
-
is the admin's data and stays out of the account's export.
|
|
647
|
-
- Deletion: the row, the payments (their failed refunds with them), the requests and the
|
|
648
|
-
them with the account too; an erased admin's id is cleared from the grants they made.
|
|
704
|
+
`currency`) and the trials extended for it by hand (`extendedAt`, `previousEndsAt`, `endsAt`).
|
|
705
|
+
Which admin granted, revoked or extended is the admin's data and stays out of the account's export.
|
|
706
|
+
- Deletion: the row, the payments (their failed refunds with them), the requests, the manual grants and the trial extensions, and the foreign keys remove
|
|
707
|
+
them with the account too; an erased admin's id is cleared from the grants and extensions they made.
|
|
649
708
|
Stripe keeps its own record of each payment (the controller's accounting record there).
|
|
650
709
|
- Reminder mail: what was sent is in `mailing.deliveries` under a recipient key (never the
|
|
651
710
|
address) and a scope naming the account id and the end; mailing keeps that ledger after an account
|
package/dist/contract.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export type BillingErrorCode =
|
|
|
7
7
|
| "billing.account_unknown"
|
|
8
8
|
/** A grant or a trial extension that ends now or earlier. */
|
|
9
9
|
| "billing.end_not_in_future";
|
|
10
|
+
/** Why an admin could not extend a trial (`extendTrialManually`). */
|
|
11
|
+
export type TrialExtensionErrorCode = "billing.account_unknown" | "billing.end_not_in_future"
|
|
12
|
+
/** The trial already ends then or later: an extension would change nothing. */
|
|
13
|
+
| "billing.trial_not_extended";
|
|
10
14
|
/** Every code a guarded write can show: the guard's own and the generic ones. */
|
|
11
15
|
export type BillingFormErrorCode = BillingErrorCode | CoreErrorCode;
|
|
12
16
|
export declare const ENTITLEMENT_STATUSES: readonly ["trial", "paid", "read_only"];
|
|
@@ -144,6 +148,10 @@ export type PaymentErrorCode =
|
|
|
144
148
|
export type PaymentFormErrorCode = PaymentErrorCode | InvoiceFieldErrorCode | "security.rate_limited" | CoreErrorCode;
|
|
145
149
|
/** Every code the admin grant form can show. */
|
|
146
150
|
export type GrantFormErrorCode = "billing.plan_unknown" | "billing.account_unknown" | "billing.lifetime_active" | "auth.forbidden" | CoreErrorCode;
|
|
151
|
+
/** Every code the admin trial form can show. */
|
|
152
|
+
export type TrialFormErrorCode = TrialExtensionErrorCode
|
|
153
|
+
/** The last day is not a calendar day (`YYYY-MM-DD`). */
|
|
154
|
+
| "billing.day_invalid" | "auth.forbidden" | CoreErrorCode;
|
|
147
155
|
/** Why an admin could not act on a request or a manual grant. */
|
|
148
156
|
export type AdminErrorCode =
|
|
149
157
|
/** The request was granted or dismissed already, or never existed. */
|
|
@@ -173,6 +181,17 @@ export interface GrantFormState {
|
|
|
173
181
|
readonly planId?: string;
|
|
174
182
|
}
|
|
175
183
|
export declare const INITIAL_GRANT_FORM_STATE: GrantFormState;
|
|
184
|
+
/** What the admin trial action returns to its form (`useActionState`). */
|
|
185
|
+
export interface TrialFormState {
|
|
186
|
+
readonly status: "idle" | "extended" | "error";
|
|
187
|
+
readonly error?: TrialFormErrorCode;
|
|
188
|
+
/** After an extension: the trial's new last day, in the app's copy. */
|
|
189
|
+
readonly notice?: string;
|
|
190
|
+
/** The email and last day as sent, to fill the form again after an error. */
|
|
191
|
+
readonly email?: string;
|
|
192
|
+
readonly lastDay?: string;
|
|
193
|
+
}
|
|
194
|
+
export declare const INITIAL_TRIAL_FORM_STATE: TrialFormState;
|
|
176
195
|
/** What an admin button (grant or dismiss a request, revoke a grant, find an account) returns to its form. */
|
|
177
196
|
export type AdminActionState = {
|
|
178
197
|
readonly status: "idle";
|
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,gBAAgB;AAC1B,8EAA8E;AAC5E,mBAAmB;AAC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EMENT_STATUSES = ["trial", "paid", "read_only"];
|
|
|
2
2
|
export const PERIOD_UNITS = ["day", "week", "month", "year"];
|
|
3
3
|
export const INITIAL_PAYMENT_FORM_STATE = { status: "idle" };
|
|
4
4
|
export const INITIAL_GRANT_FORM_STATE = { status: "idle" };
|
|
5
|
+
export const INITIAL_TRIAL_FORM_STATE = { status: "idle" };
|
|
5
6
|
export const INITIAL_ADMIN_ACTION_STATE = { status: "idle" };
|
|
6
7
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAU,CAAC;AA8E5E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAyEtE,MAAM,CAAC,MAAM,0BAA0B,GAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAa/E,MAAM,CAAC,MAAM,wBAAwB,GAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAa3E,MAAM,CAAC,MAAM,wBAAwB,GAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAQ3E,MAAM,CAAC,MAAM,0BAA0B,GAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/fields.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const PLAN_FIELD = "plan";
|
|
2
2
|
export declare const EMAIL_FIELD = "email";
|
|
3
|
+
/** The admin trial form's field: the trial's new last day, `YYYY-MM-DD`. */
|
|
4
|
+
export declare const TRIAL_LAST_DAY_FIELD = "trialLastDay";
|
|
3
5
|
export declare const INVOICE_FIELDS: {
|
|
4
6
|
readonly name: "invoiceName";
|
|
5
7
|
readonly taxId: "invoiceTaxId";
|
package/dist/fields.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,WAAW,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGtE;AAED,iHAAiH;AACjH,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,gBAAgB,mCAAoC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,uGAAuG;AACvG,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,0GAA0G;AAC1G,eAAO,MAAM,aAAa,YAAY,CAAC"}
|
package/dist/fields.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Form field names shared by the forms (`/ui`) and the actions that read them (`/next`).
|
|
2
2
|
export const PLAN_FIELD = "plan";
|
|
3
3
|
export const EMAIL_FIELD = "email";
|
|
4
|
+
/** The admin trial form's field: the trial's new last day, `YYYY-MM-DD`. */
|
|
5
|
+
export const TRIAL_LAST_DAY_FIELD = "trialLastDay";
|
|
4
6
|
export const INVOICE_FIELDS = {
|
|
5
7
|
name: "invoiceName",
|
|
6
8
|
taxId: "invoiceTaxId",
|
package/dist/fields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,gBAAgB;CACjB,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG;CACJ,CAAC;AAEX,oFAAoF;AACpF,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,MAAM,GAAG,GAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAqC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;IAC5H,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,iHAAiH;AACjH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,WAAW,CAAU,CAAC;AAIlE,uGAAuG;AACvG,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,0GAA0G;AAC1G,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
91
91
|
empty: string;
|
|
92
92
|
};
|
|
93
93
|
payment: {
|
|
94
|
+
heading: string;
|
|
94
95
|
title: string;
|
|
95
96
|
lead: string;
|
|
96
97
|
plansLabel: string;
|
|
@@ -112,6 +113,7 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
112
113
|
lifetime: string;
|
|
113
114
|
};
|
|
114
115
|
admin: {
|
|
116
|
+
heading: string;
|
|
115
117
|
title: string;
|
|
116
118
|
lead: string;
|
|
117
119
|
email: string;
|
|
@@ -121,6 +123,15 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
121
123
|
granted: string;
|
|
122
124
|
grantedUntil: string;
|
|
123
125
|
noPlans: string;
|
|
126
|
+
trial: {
|
|
127
|
+
title: string;
|
|
128
|
+
lead: string;
|
|
129
|
+
email: string;
|
|
130
|
+
lastDay: string;
|
|
131
|
+
submit: string;
|
|
132
|
+
pending: string;
|
|
133
|
+
extended: string;
|
|
134
|
+
};
|
|
124
135
|
requests: {
|
|
125
136
|
title: string;
|
|
126
137
|
lead: string;
|
|
@@ -164,6 +175,10 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
164
175
|
revoke: string;
|
|
165
176
|
revoking: string;
|
|
166
177
|
revokeLabel: string;
|
|
178
|
+
trialExtended: string;
|
|
179
|
+
trialUntil: string;
|
|
180
|
+
extendedOn: string;
|
|
181
|
+
trialWasUntil: string;
|
|
167
182
|
};
|
|
168
183
|
};
|
|
169
184
|
errors: {
|
|
@@ -180,6 +195,8 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
180
195
|
lifetime_active: string;
|
|
181
196
|
request_closed: string;
|
|
182
197
|
grant_revoked: string;
|
|
198
|
+
trial_not_extended: string;
|
|
199
|
+
day_invalid: string;
|
|
183
200
|
};
|
|
184
201
|
security: {
|
|
185
202
|
rate_limited: string;
|
|
@@ -254,7 +271,7 @@ export declare const billing: import("@softure-ai/core").ModuleFactory<{
|
|
|
254
271
|
adminRole: import("zod").ZodDefault<import("zod").ZodString>;
|
|
255
272
|
}, import("zod/v4/core").$strict>>;
|
|
256
273
|
export { getDayNumber, getDaysLeft, getStartOfDay, getTrialEnd, parseDay } from "./calendar.js";
|
|
257
|
-
export { ENTITLEMENT_STATUSES, INITIAL_ADMIN_ACTION_STATE, INITIAL_GRANT_FORM_STATE, INITIAL_PAYMENT_FORM_STATE, PERIOD_UNITS, type AdminActionErrorCode, type AdminActionState, type AdminErrorCode, type BillingErrorCode, type BillingFormErrorCode, type Entitlement, type EntitlementEvent, type EntitlementRecord, type EntitlementStatus, type GrantFormErrorCode, type GrantFormState, type LocalizedText, type PaymentErrorCode, type PaymentFormErrorCode, type PaymentFormState, type PaymentGrant, type PeriodUnit, type Plan, type PlanPeriod, type PlanPrice, } from "./contract.js";
|
|
274
|
+
export { ENTITLEMENT_STATUSES, INITIAL_ADMIN_ACTION_STATE, INITIAL_GRANT_FORM_STATE, INITIAL_PAYMENT_FORM_STATE, INITIAL_TRIAL_FORM_STATE, PERIOD_UNITS, type AdminActionErrorCode, type AdminActionState, type AdminErrorCode, type BillingErrorCode, type TrialExtensionErrorCode, type TrialFormErrorCode, type TrialFormState, type BillingFormErrorCode, type Entitlement, type EntitlementEvent, type EntitlementRecord, type EntitlementStatus, type GrantFormErrorCode, type GrantFormState, type LocalizedText, type PaymentErrorCode, type PaymentFormErrorCode, type PaymentFormState, type PaymentGrant, type PeriodUnit, type Plan, type PlanPeriod, type PlanPrice, } from "./contract.js";
|
|
258
275
|
export { applyEntitlementEvent, hasWriteAccess, resolveEntitlement, type EntitlementPolicy } from "./entitlement.js";
|
|
259
276
|
export { CHECKOUT_PARAM, CHECKOUT_RESULTS, type CheckoutResult } from "./fields.js";
|
|
260
277
|
export { invoiceDetailsSchema, type InvoiceFieldErrorCode } from "./invoice.js";
|
|
@@ -267,7 +284,7 @@ export { getPaymentGrant, getRefundEvent, getRestoredDays, getTakenBackDays, get
|
|
|
267
284
|
export { ACCESS_REMINDER_KINDS, DEFAULT_CATCH_UP_DAYS, getAccessReminder, getAccessReminderScope, MAX_CATCH_UP_DAYS, type AccessReminder, type AccessReminderInput, type AccessReminderKind, } from "./reminder.js";
|
|
268
285
|
export { CURRENCY_MINOR_UNIT_DIGITS } from "./currency-digits.js";
|
|
269
286
|
export { formatPrice, getMinorUnitDigits, isSupportedCurrency } from "./price.js";
|
|
270
|
-
export { billingSchema, entitlements, manualGrants, paymentRequests, payments } from "./schema.js";
|
|
287
|
+
export { billingSchema, entitlements, manualGrants, paymentRequests, payments, trialExtensions } from "./schema.js";
|
|
271
288
|
export { getCheckoutSessionParams, stripe, STRIPE_API_BASE, STRIPE_SECRET_KEY_ENV, STRIPE_TIMEOUT_MS, type StripeOptions } from "./stripe.js";
|
|
272
289
|
export { describeStripePriceProblem, fromStripeAmount, getStripeMinorUnitDigits, STRIPE_THREE_DECIMAL_CURRENCIES, STRIPE_ZERO_DECIMAL_CURRENCIES, toStripeAmount, } from "./stripe-currency.js";
|
|
273
290
|
export { parseStripeEvent, readStripeWebhook, signStripePayload, STRIPE_METADATA, STRIPE_SIGNATURE_HEADER, STRIPE_SIGNATURE_TOLERANCE_SECONDS, verifyStripeSignature, type FailedRefund, type PaidCheckout, type SignStripePayloadInput, type StripeWebhookError, type StripeWebhookEvent, type VerifyStripeSignatureInput, } from "./stripe-webhook.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;CAE7B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;CAE7B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA6BlB,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,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B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9I,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,kCAAkC,EAClC,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,10 +25,10 @@ export const BILLING_RATE_LIMIT_BUCKETS = {
|
|
|
25
25
|
export const billing = defineModule({
|
|
26
26
|
manifest: {
|
|
27
27
|
id: MODULE_ID,
|
|
28
|
-
version: "0.1.
|
|
28
|
+
version: "0.1.8",
|
|
29
29
|
dependsOn: { security: "^0.1.0", auth: "^0.1.0", mailing: "^0.1.0?", ops: "^0.1.0?" },
|
|
30
30
|
dbSchema: "billing",
|
|
31
|
-
tables: ["entitlements", "payments", "payment_requests", "manual_grants"],
|
|
31
|
+
tables: ["entitlements", "payments", "payment_requests", "manual_grants", "trial_extensions"],
|
|
32
32
|
env: [
|
|
33
33
|
{
|
|
34
34
|
name: "STRIPE_SECRET_KEY",
|
|
@@ -53,7 +53,7 @@ export const billing = defineModule({
|
|
|
53
53
|
health: checkBillingTables,
|
|
54
54
|
});
|
|
55
55
|
export { getDayNumber, getDaysLeft, getStartOfDay, getTrialEnd, parseDay } from "./calendar.js";
|
|
56
|
-
export { ENTITLEMENT_STATUSES, INITIAL_ADMIN_ACTION_STATE, INITIAL_GRANT_FORM_STATE, INITIAL_PAYMENT_FORM_STATE, PERIOD_UNITS, } from "./contract.js";
|
|
56
|
+
export { ENTITLEMENT_STATUSES, INITIAL_ADMIN_ACTION_STATE, INITIAL_GRANT_FORM_STATE, INITIAL_PAYMENT_FORM_STATE, INITIAL_TRIAL_FORM_STATE, PERIOD_UNITS, } from "./contract.js";
|
|
57
57
|
export { applyEntitlementEvent, hasWriteAccess, resolveEntitlement } from "./entitlement.js";
|
|
58
58
|
export { CHECKOUT_PARAM, CHECKOUT_RESULTS } from "./fields.js";
|
|
59
59
|
export { invoiceDetailsSchema } from "./invoice.js";
|
|
@@ -66,7 +66,7 @@ export { getPaymentGrant, getRefundEvent, getRestoredDays, getTakenBackDays, get
|
|
|
66
66
|
export { ACCESS_REMINDER_KINDS, DEFAULT_CATCH_UP_DAYS, getAccessReminder, getAccessReminderScope, MAX_CATCH_UP_DAYS, } from "./reminder.js";
|
|
67
67
|
export { CURRENCY_MINOR_UNIT_DIGITS } from "./currency-digits.js";
|
|
68
68
|
export { formatPrice, getMinorUnitDigits, isSupportedCurrency } from "./price.js";
|
|
69
|
-
export { billingSchema, entitlements, manualGrants, paymentRequests, payments } from "./schema.js";
|
|
69
|
+
export { billingSchema, entitlements, manualGrants, paymentRequests, payments, trialExtensions } from "./schema.js";
|
|
70
70
|
export { getCheckoutSessionParams, stripe, STRIPE_API_BASE, STRIPE_SECRET_KEY_ENV, STRIPE_TIMEOUT_MS } from "./stripe.js";
|
|
71
71
|
export { describeStripePriceProblem, fromStripeAmount, getStripeMinorUnitDigits, STRIPE_THREE_DECIMAL_CURRENCIES, STRIPE_ZERO_DECIMAL_CURRENCIES, toStripeAmount, } from "./stripe-currency.js";
|
|
72
72
|
export { parseStripeEvent, readStripeWebhook, signStripePayload, STRIPE_METADATA, STRIPE_SIGNATURE_HEADER, STRIPE_SIGNATURE_TOLERANCE_SECONDS, verifyStripeSignature, } from "./stripe-webhook.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,iGAAiG;AACjG,yFAAyF;AACzF,wFAAwF;AACxF,oGAAoG;AACpG,2FAA2F;AAC3F,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,iBAAiB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE;CAC1C,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,QAAQ,EAAE;QACR,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAA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AgB,EAChB,uBAAuB,GAIxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,GAOlB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,GAIlB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAsB,MAAM,aAAa,CAAC;AAC9I,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,kCAAkC,EAClC,qBAAqB,GAOtB,MAAM,qBAAqB,CAAC"}
|
|
@@ -28,11 +28,17 @@ export interface AccessReminderSummary {
|
|
|
28
28
|
readonly due: number;
|
|
29
29
|
/** Mails sent now. */
|
|
30
30
|
readonly sent: number;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Mails an earlier run sent (or refused), another run is sending right now, or whose send was interrupted
|
|
33
|
+
* so long ago that it may have gone out (mailing's `uncertain`).
|
|
34
|
+
*/
|
|
32
35
|
readonly skipped: number;
|
|
33
36
|
/** Mails refused for good (an invalid address, the provider rejected it). */
|
|
34
37
|
readonly rejected: number;
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Mails the provider could not take now; the next run sends them. A refused account or a spent quota stops the
|
|
40
|
+
* run there: the mails after it are not counted and go out on the next run.
|
|
41
|
+
*/
|
|
36
42
|
readonly retryLater: number;
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminder-mail.d.ts","sourceRoot":"","sources":["../../src/mailing/reminder-mail.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEjF,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAG9F,gGAAgG;AAChG,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wEAAwE;AACxE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpG,MAAM,WAAW,0BAA2B,S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;IAC5E,kGAAkG;IAClG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAeD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,GAAG,kBAAkB,CAStH;AAMD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA0BjJ"}
|
|
@@ -53,10 +53,15 @@ export async function sendAccessReminders(ctx, options = {}) {
|
|
|
53
53
|
const lastDay = formatLastDay(reminder.endsAt, ctx.config.locale, ctx.config.timezone);
|
|
54
54
|
const mail = renderAccessReminderMail(messages, { kind: reminder.kind, lastDay, link });
|
|
55
55
|
const outcome = await deliverOnce(ctx, { scope: getAccessReminderScope(reminder.kind, reminder.userId, reminder.endsAt), mail: { to: reminder.email, ...mail } });
|
|
56
|
-
if (outcome.status === "done" || outcome.status === "in-flight") {
|
|
56
|
+
if (outcome.status === "done" || outcome.status === "in-flight" || outcome.status === "uncertain") {
|
|
57
57
|
counts.skipped += 1;
|
|
58
58
|
continue;
|
|
59
59
|
}
|
|
60
|
+
if (outcome.status === "halted") {
|
|
61
|
+
// The account cannot send (refused key, spent quota): every other mail would fail the same way.
|
|
62
|
+
counts.retryLater += 1;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
60
65
|
if (outcome.status === "sent")
|
|
61
66
|
counts.sent += 1;
|
|
62
67
|
else if (outcome.status === "rejected")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminder-mail.js","sourceRoot":"","sources":["../../src/mailing/reminder-mail.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,oGAAoG;AACpG,oGAAoG;AACpG,yFAAyF;AACzF,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAmC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,gGAAgG;AAChG,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"reminder-mail.js","sourceRoot":"","sources":["../../src/mailing/reminder-mail.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,oGAAoG;AACpG,oGAAoG;AACpG,yFAAyF;AACzF,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAmC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD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;
|
|
74
75
|
title: string;
|
|
75
76
|
lead: string;
|
|
76
77
|
plansLabel: string;
|
|
@@ -92,6 +93,7 @@ export declare const en: {
|
|
|
92
93
|
lifetime: string;
|
|
93
94
|
};
|
|
94
95
|
admin: {
|
|
96
|
+
heading: string;
|
|
95
97
|
title: string;
|
|
96
98
|
lead: string;
|
|
97
99
|
email: string;
|
|
@@ -101,6 +103,15 @@ export declare const en: {
|
|
|
101
103
|
granted: string;
|
|
102
104
|
grantedUntil: string;
|
|
103
105
|
noPlans: string;
|
|
106
|
+
trial: {
|
|
107
|
+
title: string;
|
|
108
|
+
lead: string;
|
|
109
|
+
email: string;
|
|
110
|
+
lastDay: string;
|
|
111
|
+
submit: string;
|
|
112
|
+
pending: string;
|
|
113
|
+
extended: string;
|
|
114
|
+
};
|
|
104
115
|
requests: {
|
|
105
116
|
title: string;
|
|
106
117
|
lead: string;
|
|
@@ -144,6 +155,10 @@ export declare const en: {
|
|
|
144
155
|
revoke: string;
|
|
145
156
|
revoking: string;
|
|
146
157
|
revokeLabel: string;
|
|
158
|
+
trialExtended: string;
|
|
159
|
+
trialUntil: string;
|
|
160
|
+
extendedOn: string;
|
|
161
|
+
trialWasUntil: string;
|
|
147
162
|
};
|
|
148
163
|
};
|
|
149
164
|
errors: {
|
|
@@ -160,6 +175,8 @@ export declare const en: {
|
|
|
160
175
|
lifetime_active: string;
|
|
161
176
|
request_closed: string;
|
|
162
177
|
grant_revoked: string;
|
|
178
|
+
trial_not_extended: string;
|
|
179
|
+
day_invalid: string;
|
|
163
180
|
};
|
|
164
181
|
security: {
|
|
165
182
|
rate_limited: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKd,CAAC"}
|