recess-cli 3.61.0 → 3.62.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/commands/tuition.js +47 -5
- package/dist/help.js +2 -0
- package/package.json +3 -3
package/dist/commands/tuition.js
CHANGED
|
@@ -27,8 +27,14 @@ function renderSchedule({ schedule, signed, events, revisions, }) {
|
|
|
27
27
|
`${schedule.kidName} · ${schedule.parentName} <${schedule.parentEmail}> · ${schedule.stateCode}`,
|
|
28
28
|
`Schedule ${schedule.id} · packet ${schedule.packetId}`,
|
|
29
29
|
`Payer ${schedule.payer} · collection ${schedule.defaultCollection} · automatic invoicing ${schedule.autoInvoice ? "on" : "OFF"} · option ${schedule.sourceOptionId}`,
|
|
30
|
-
`Signed ${dollars(schedule.agreedTotalCents)} · scheduled ${dollars(schedule.scheduledCents)} · paid ${dollars(schedule.paidCents)} · open ${dollars(schedule.openCents)}`,
|
|
30
|
+
`Signed ${dollars(schedule.agreedTotalCents)} · scheduled ${dollars(schedule.scheduledCents)} (ESA/scholarship ${dollars(schedule.stateFundingCents)}, family ${dollars(schedule.familyCents)}${schedule.fundingMissingCount || schedule.fundingPendingCount ? ", split incomplete" : ""}) · paid ${dollars(schedule.paidCents)} · open ${dollars(schedule.openCents)}`,
|
|
31
31
|
];
|
|
32
|
+
if (schedule.fundingMissingCount) {
|
|
33
|
+
out.push(`!! ${schedule.fundingMissingCount} installment(s) have a confirmed award but no ESA amount, so these totals are low. Run \`recess tuition repair-funding ${schedule.id}\`.`);
|
|
34
|
+
}
|
|
35
|
+
if (schedule.fundingPendingCount) {
|
|
36
|
+
out.push(`${schedule.fundingPendingCount} installment(s) wait for an award to be confirmed.`);
|
|
37
|
+
}
|
|
32
38
|
if (schedule.scheduledCents !== schedule.agreedTotalCents) {
|
|
33
39
|
out.push(`!! The rows add up to ${dollars(schedule.scheduledCents)}, not the signed ${dollars(schedule.agreedTotalCents)}.`);
|
|
34
40
|
}
|
|
@@ -50,7 +56,7 @@ function renderSchedule({ schedule, signed, events, revisions, }) {
|
|
|
50
56
|
...schedule.installments.map((row) => [
|
|
51
57
|
String(row.sequence),
|
|
52
58
|
row.status,
|
|
53
|
-
`${dollars(row.amountCents)}${row.creditedCents ? ` (${dollars(row.amountCents - row.creditedCents)} after credit)` : ""}${row.refundedCents ? ` (${dollars(row.refundedCents)} refunded)` : ""}${row.feeCents ? ` (${dollars(row.feeCents)} fee withheld)` : ""}`,
|
|
59
|
+
`${dollars(row.amountCents)}${row.stateFundingCents === null ? (row.award === "CONFIRMED" || row.award === "PENDING" ? " (ESA amount missing)" : "") : row.stateFundingCents > 0 ? ` (ESA ${dollars(row.stateFundingCents)} + family ${dollars(row.familyCents ?? 0)})` : ""}${row.creditedCents ? ` (${dollars(row.amountCents - row.creditedCents)} after credit)` : ""}${row.refundedCents ? ` (${dollars(row.refundedCents)} refunded)` : ""}${row.feeCents ? ` (${dollars(row.feeCents)} fee withheld)` : ""}`,
|
|
54
60
|
row.invoiceDate,
|
|
55
61
|
row.dueDate,
|
|
56
62
|
row.collection,
|
|
@@ -210,6 +216,7 @@ export async function runTuitionCommand({ parsed, api, writeCommand, }) {
|
|
|
210
216
|
? `${next.invoiceDate} ${dollars(next.amountCents)} ${next.status}`
|
|
211
217
|
: "nothing open",
|
|
212
218
|
[
|
|
219
|
+
s.fundingMissingCount ? "ESA amounts missing" : null,
|
|
213
220
|
s.needsReviewCount ? `${s.needsReviewCount} to review` : null,
|
|
214
221
|
s.pausedAt ? "paused" : null,
|
|
215
222
|
s.held ? "held" : null,
|
|
@@ -240,6 +247,26 @@ export async function runTuitionCommand({ parsed, api, writeCommand, }) {
|
|
|
240
247
|
}));
|
|
241
248
|
return { help: renderSchedule(detail) };
|
|
242
249
|
};
|
|
250
|
+
if (verb === "repair-funding") {
|
|
251
|
+
const scheduleId = positional(parsed, 2, "schedule ID");
|
|
252
|
+
const preview = unwrap(await api.client.GET("/admin/tuition-billing/{scheduleId}/funding-repair", {
|
|
253
|
+
params: { path: { scheduleId } },
|
|
254
|
+
}));
|
|
255
|
+
if (preview.outcome === "skipped") {
|
|
256
|
+
throw new CliError("conflict", preview.reason ?? "The signed plan cannot restore these amounts.");
|
|
257
|
+
}
|
|
258
|
+
return writeCommand(parsed, {
|
|
259
|
+
action: `restore the ESA amounts on tuition schedule ${scheduleId} from its signed plan: total to bill becomes ${dollars(preview.totalCents ?? 0)}, changed installments go to review, automatic invoicing turns off, nothing is sent`,
|
|
260
|
+
target: { scheduleId },
|
|
261
|
+
request: {},
|
|
262
|
+
details: {
|
|
263
|
+
totalCents: preview.totalCents,
|
|
264
|
+
stateFundingCents: preview.stateFundingCents,
|
|
265
|
+
familyCents: preview.familyCents,
|
|
266
|
+
installments: preview.changes,
|
|
267
|
+
},
|
|
268
|
+
}, async () => shown(unwrap(await api.client.POST("/admin/tuition-billing/{scheduleId}/funding-repair", { params: { path: { scheduleId } } })).schedule));
|
|
269
|
+
}
|
|
243
270
|
if (verb === "edit") {
|
|
244
271
|
const installmentId = positional(parsed, 2, "installment ID");
|
|
245
272
|
const collection = flagString(parsed, "collection")?.trim().toLowerCase();
|
|
@@ -508,7 +535,7 @@ export async function runTuitionCommand({ parsed, api, writeCommand, }) {
|
|
|
508
535
|
return [
|
|
509
536
|
`Tuition billing as of ${summary.today} (automatic invoicing ${summary.invoicingEnabled ? "on" : "off"} on this server)`,
|
|
510
537
|
"",
|
|
511
|
-
`Sold ${dollars(t.contracted.cents)} (${t.contracted.count} installments)`,
|
|
538
|
+
`Sold ${dollars(t.contracted.cents)} (${t.contracted.count} installments; ESA/scholarship ${dollars(t.contractedStateFundingCents)}, family ${dollars(t.contractedFamilyCents)}, no ESA amount recorded ${dollars(t.contracted.cents - t.contractedStateFundingCents - t.contractedFamilyCents)})`,
|
|
512
539
|
`Collected ${dollars(t.collected.cents)}`,
|
|
513
540
|
`Invoiced, open ${dollars(t.invoicedOpen.cents)} (${t.invoicedOpen.count})`,
|
|
514
541
|
`Past due ${dollars(t.pastDue.cents)} (${t.pastDue.count})`,
|
|
@@ -517,7 +544,22 @@ export async function runTuitionCommand({ parsed, api, writeCommand, }) {
|
|
|
517
544
|
`Earned ${dollars(t.earnedCents)} (uncollected ${dollars(t.earnedUncollectedCents)}, collected ahead ${dollars(t.collectedAheadCents)})`,
|
|
518
545
|
`Partner schools ${dollars(summary.partner.received.cents)} received of ${dollars(summary.partner.contracted.cents)}, ${dollars(summary.partner.overdue.cents)} overdue`,
|
|
519
546
|
"",
|
|
520
|
-
`Needs review ${a.needsReview} · invoiced by hand ${a.manualInvoicing} · changes waiting for family ${a.awaitingFamily} · applied without consent ${a.appliedWithoutConsent} · written notice due ${a.formalNoticeDue} · failed payments ${a.paymentFailed} · paused ${a.paused}`,
|
|
547
|
+
`Needs review ${a.needsReview} · invoiced by hand ${a.manualInvoicing} · changes waiting for family ${a.awaitingFamily} · applied without consent ${a.appliedWithoutConsent} · written notice due ${a.formalNoticeDue} · failed payments ${a.paymentFailed} · paused ${a.paused} · awaiting award ${a.fundingPending}`,
|
|
548
|
+
...(summary.fundingMissing.length
|
|
549
|
+
? [
|
|
550
|
+
"",
|
|
551
|
+
"Missing ESA amounts (totals above run low):",
|
|
552
|
+
renderColumns([
|
|
553
|
+
["Student", "Parent", "Installments", "Schedule"],
|
|
554
|
+
...summary.fundingMissing.map((row) => [
|
|
555
|
+
row.kidName,
|
|
556
|
+
row.parentName,
|
|
557
|
+
String(row.installments),
|
|
558
|
+
row.scheduleId,
|
|
559
|
+
]),
|
|
560
|
+
]),
|
|
561
|
+
]
|
|
562
|
+
: []),
|
|
521
563
|
...(summary.pastDue.length
|
|
522
564
|
? [
|
|
523
565
|
"",
|
|
@@ -630,6 +672,6 @@ export async function runTuitionCommand({ parsed, api, writeCommand, }) {
|
|
|
630
672
|
request: body,
|
|
631
673
|
}, async () => unwrap(await api.client.POST("/admin/tuition-billing/auto-invoice", { body })));
|
|
632
674
|
}
|
|
633
|
-
throw new CliError("invalid_arguments", "Usage: recess tuition summary|list|show|create|edit|add|release|void|reopen|mark-paid|draft|send|pull-back|email|resend-approval|record-consent|withdraw|retry-change|auto-invoice|pause|resume|set. See `recess help`.");
|
|
675
|
+
throw new CliError("invalid_arguments", "Usage: recess tuition summary|list|show|create|edit|add|release|void|reopen|mark-paid|draft|send|pull-back|email|resend-approval|record-consent|withdraw|retry-change|auto-invoice|pause|resume|set|repair-funding. See `recess help`.");
|
|
634
676
|
}
|
|
635
677
|
//# sourceMappingURL=tuition.js.map
|
package/dist/help.js
CHANGED
|
@@ -418,6 +418,7 @@ Usage:
|
|
|
418
418
|
recess [--json] tuition auto-invoice on|off (<schedule-id>... | --all) [--confirm]
|
|
419
419
|
recess [--json] tuition pause <schedule-id> [--note TEXT] [--confirm]
|
|
420
420
|
recess [--json] tuition resume <schedule-id> [--confirm]
|
|
421
|
+
recess [--json] tuition repair-funding <schedule-id> [--confirm]
|
|
421
422
|
recess [--json] tuition set <schedule-id> [--payer family|az-esa|fl-scholarship|partner-school] [--collection invoice|auto-charge|out-of-band] [--auto-invoice on|off] [--enrollment direct|partner-school|program [--partner-school <slug>]] [--annual DOLLARS] [--start YYYY-MM-DD] [--end YYYY-MM-DD|none] [--confirm]
|
|
422
423
|
recess [--json] admissions create --school <institution-slug> --enrollment direct|partner-school|program
|
|
423
424
|
[--partner-school <slug|id>] --parent "First Last" --email EMAIL [--phone TEXT] --state XX
|
|
@@ -1636,6 +1637,7 @@ export const COMMAND_SUMMARIES = {
|
|
|
1636
1637
|
"tuition mark-paid": "Record an installment paid outside Recess.",
|
|
1637
1638
|
"tuition pause": "Hold everything on a tuition schedule.",
|
|
1638
1639
|
"tuition resume": "Resume a paused tuition schedule.",
|
|
1640
|
+
"tuition repair-funding": "Restore missing ESA amounts on a schedule from its signed plan (sends nothing).",
|
|
1639
1641
|
"tuition set": "Change a schedule's payer, default collection or automatic invoicing.",
|
|
1640
1642
|
"placement give": "Give a kid the math or reading placement quest as a todo.",
|
|
1641
1643
|
"placement show": "One kid's placement answers, mistakes, timing and sounds check.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recess-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.62.0",
|
|
4
4
|
"description": "Safe Recess administration and family AI tools from the command line.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"oxlint-tsgolint": "^0.6.0",
|
|
47
47
|
"typescript": "^5.9.2",
|
|
48
48
|
"vitest": "^1.6.0",
|
|
49
|
-
"@tryrecess/
|
|
50
|
-
"@tryrecess/
|
|
49
|
+
"@tryrecess/api-types": "0.0.0",
|
|
50
|
+
"@tryrecess/typescript-config": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "node node_modules/@tryrecess/typescript-config/bin/tsc-fast.mjs",
|