recess-cli 3.20.0 → 3.22.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/args.js +2 -0
- package/dist/cli.js +4 -0
- package/dist/commands/admissions.js +89 -4
- package/dist/commands/rocky-free.js +118 -0
- package/dist/commands/tuition-plans.js +9 -9
- package/dist/help.js +21 -4
- package/package.json +1 -1
package/dist/args.js
CHANGED
|
@@ -26,6 +26,7 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
26
26
|
"custom-only",
|
|
27
27
|
"no-agreement",
|
|
28
28
|
"paywall-offline",
|
|
29
|
+
"override-aid-price",
|
|
29
30
|
"no-email",
|
|
30
31
|
"no-paywall",
|
|
31
32
|
"no-text",
|
|
@@ -47,6 +48,7 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
47
48
|
"clear-send-hour",
|
|
48
49
|
"confirm",
|
|
49
50
|
"confirm-destructive-changes",
|
|
51
|
+
"default",
|
|
50
52
|
"disable-applet-follow-ups",
|
|
51
53
|
"dry-run",
|
|
52
54
|
"enable-applet-follow-ups",
|
package/dist/cli.js
CHANGED
|
@@ -25,6 +25,7 @@ import { runReportsCommand } from "./commands/reports.js";
|
|
|
25
25
|
import { runMasteryCommand } from "./commands/mastery.js";
|
|
26
26
|
import { runOnboardingCommand } from "./commands/onboarding.js";
|
|
27
27
|
import { runScheduleCommand, runMemoryFilesCommand, } from "./commands/safe-staff-operations.js";
|
|
28
|
+
import { runRockyFreeCommand } from "./commands/rocky-free.js";
|
|
28
29
|
import { runSchoolCommand } from "./commands/school.js";
|
|
29
30
|
import { runVillageEventsCommand } from "./commands/village-events.js";
|
|
30
31
|
import { assertChoice, flagIdList, positional, readJsonFile, readJsonValue, } from "./commands/shared.js";
|
|
@@ -6496,6 +6497,9 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
6496
6497
|
}
|
|
6497
6498
|
throw new CliError("invalid_arguments", "Use memories context|log.");
|
|
6498
6499
|
}
|
|
6500
|
+
if (noun === "rocky" && verb === "free") {
|
|
6501
|
+
return runRockyFreeCommand({ parsed, api, writeCommand });
|
|
6502
|
+
}
|
|
6499
6503
|
if (noun === "rocky") {
|
|
6500
6504
|
const studentId = flagString(parsed, "student", { required: true });
|
|
6501
6505
|
if (verb === "get") {
|
|
@@ -70,6 +70,22 @@ function renderAnswers(responses, questions) {
|
|
|
70
70
|
}
|
|
71
71
|
return lines;
|
|
72
72
|
}
|
|
73
|
+
/** Which aid application the new packet carries and where its price came from. */
|
|
74
|
+
function aidLines(aid, priceSource) {
|
|
75
|
+
const how = {
|
|
76
|
+
explicit: "named with --financial-aid",
|
|
77
|
+
application: "the application's own aid form",
|
|
78
|
+
email: "matched by the parent's email",
|
|
79
|
+
};
|
|
80
|
+
return [
|
|
81
|
+
aid
|
|
82
|
+
? `Financial aid: application ${aid.id} (${how[aid.matchedBy]}), ${aid.reviewed ? `reviewed${aid.determinedAnnualTuition !== null ? `, $${aid.determinedAnnualTuition.toLocaleString("en-US")}/yr after aid` : ""}` : "not reviewed yet"}.`
|
|
83
|
+
: "Financial aid: none attached.",
|
|
84
|
+
...(priceSource === "aid_review"
|
|
85
|
+
? ["Annual price taken from the aid review (no --annual given)."]
|
|
86
|
+
: []),
|
|
87
|
+
];
|
|
88
|
+
}
|
|
73
89
|
function renderPacket(packet, admissionUrl, questions = []) {
|
|
74
90
|
const when = (iso) => (iso ? iso.slice(0, 10) : "–");
|
|
75
91
|
const out = [
|
|
@@ -78,7 +94,7 @@ function renderPacket(packet, admissionUrl, questions = []) {
|
|
|
78
94
|
`${packet.enrollmentType === "PARTNER_SCHOOL" ? `Through ${packet.partnerSchool?.name ?? "partner school"}` : packet.enrollmentType === "PROGRAM" ? "Online learning program" : "Direct enrollment"} · ${packet.institution.name} · tier ${packet.tierId}${packet.paywallOutOfBand ? ` · out-of-band paywall${packet.paywallCents ? ` ${dollars(packet.paywallCents)}` : " (the signed plan's first invoice)"}` : packet.paywallCents ? ` · paywall ${dollars(packet.paywallCents)}` : " · no paywall"}`,
|
|
79
95
|
`Status: ${packet.status} (${STEP_LABELS[packet.step]})${packet.noAgreement ? " · no tuition agreement" : ""}`,
|
|
80
96
|
packet.financialAidApplication
|
|
81
|
-
? `Financial aid answers in the envelope: application ${packet.financialAidApplication.id} (${packet.financialAidApplication.createdAt.slice(0, 10)})`
|
|
97
|
+
? `Financial aid answers in the envelope: application ${packet.financialAidApplication.id} (${packet.financialAidApplication.createdAt.slice(0, 10)})${packet.financialAidApplication.determinedAnnualTuition !== null && packet.kids.length > 1 ? ` · reviewed at $${packet.financialAidApplication.determinedAnnualTuition.toLocaleString("en-US")}/yr for the family (the plan's annual is per child)` : packet.financialAidApplication.determinedAnnualTuition !== null ? ` · reviewed at $${packet.financialAidApplication.determinedAnnualTuition.toLocaleString("en-US")}/yr after aid${Number(packet.planSpec.annualTuition) === packet.financialAidApplication.determinedAnnualTuition || packet.noAgreement ? "" : ` (plan uses $${Number(packet.planSpec.annualTuition).toLocaleString("en-US")}${packet.financialAidApplication.reviewedAt && packet.financialAidApplication.reviewedAt > packet.planSetAt && !packet.paidAt ? ": the review changed since, requote to match" : ""})`}` : " · not reviewed"}`
|
|
82
98
|
: "No financial aid application attached (nothing to initial).",
|
|
83
99
|
"",
|
|
84
100
|
renderColumns([
|
|
@@ -275,7 +291,10 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
275
291
|
(flagString(parsed, "start") || flagString(parsed, "annual"))) {
|
|
276
292
|
throw new CliError("invalid_arguments", "--no-agreement takes no tuition plan; drop --start/--annual and the other plan flags.");
|
|
277
293
|
}
|
|
278
|
-
|
|
294
|
+
// No --annual: the server prices the plan from the aid review.
|
|
295
|
+
const plan = noAgreement
|
|
296
|
+
? null
|
|
297
|
+
: parseTuitionPlanSpecFlags(parsed, { annualOptional: true });
|
|
279
298
|
const offline = hasFlag(parsed, "paywall-offline");
|
|
280
299
|
if (noAgreement && offline) {
|
|
281
300
|
throw new CliError("invalid_arguments", "--paywall-offline bills the signed plan's first invoice, so it needs an agreement. Use --paywall DOLLARS instead.");
|
|
@@ -301,6 +320,9 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
301
320
|
...(flagString(parsed, "financial-aid")
|
|
302
321
|
? { financialAidApplicationId: flagString(parsed, "financial-aid") }
|
|
303
322
|
: {}),
|
|
323
|
+
...(hasFlag(parsed, "override-aid-price")
|
|
324
|
+
? { overrideAidPrice: true }
|
|
325
|
+
: {}),
|
|
304
326
|
institutionSlug: flagString(parsed, "school", { required: true }),
|
|
305
327
|
enrollment,
|
|
306
328
|
...(partnerSchool ? { partnerSchool } : {}),
|
|
@@ -326,7 +348,7 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
326
348
|
sendEmail: !hasFlag(parsed, "no-email"),
|
|
327
349
|
};
|
|
328
350
|
return writeCommand(parsed, {
|
|
329
|
-
action: `create an admission packet${noAgreement ? " without a tuition agreement" : ""} for ${body.parentEmail} (${kids.map((k) => k.firstName).join(", ")}) and ${body.sendEmail ? "email them the link" : "return the link without emailing"}`,
|
|
351
|
+
action: `create an admission packet${noAgreement ? " without a tuition agreement" : plan && plan.annualTuition === undefined ? " priced from the reviewed financial aid application" : ""} for ${body.parentEmail} (${kids.map((k) => k.firstName).join(", ")}) and ${body.sendEmail ? "email them the link" : "return the link without emailing"}`,
|
|
330
352
|
target: { parentEmail: body.parentEmail, school: body.institutionSlug },
|
|
331
353
|
request: body,
|
|
332
354
|
...(warnings.length ? { details: { warnings } } : {}),
|
|
@@ -347,10 +369,16 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
347
369
|
"No tuition agreement: the parent goes from the account to consent.",
|
|
348
370
|
]),
|
|
349
371
|
"",
|
|
372
|
+
...aidLines(result.financialAid, result.priceSource),
|
|
350
373
|
result.emailed
|
|
351
374
|
? `Emailed ${result.packet.parentEmail}.`
|
|
352
375
|
: "Not emailed (--no-email); send the link yourself.",
|
|
353
376
|
...warnings.map((w) => `Warning: ${w}`),
|
|
377
|
+
...(result.financialAid?.matchedBy === "email"
|
|
378
|
+
? [
|
|
379
|
+
`Warning: the aid application was matched by email only (no aid form on the application). If it is the wrong one, void this packet and recreate it with --financial-aid <id> or --financial-aid none.`,
|
|
380
|
+
]
|
|
381
|
+
: []),
|
|
354
382
|
].join("\n"),
|
|
355
383
|
};
|
|
356
384
|
});
|
|
@@ -413,7 +441,10 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
413
441
|
if (keepPlan && dropAgreement) {
|
|
414
442
|
throw new CliError("invalid_arguments", "Use --keep-plan, --no-agreement or new plan flags, not a mix.");
|
|
415
443
|
}
|
|
416
|
-
|
|
444
|
+
// No --annual: the server takes the packet's reviewed aid price.
|
|
445
|
+
const plan = keepPlan || dropAgreement
|
|
446
|
+
? null
|
|
447
|
+
: parseTuitionPlanSpecFlags(parsed, { annualOptional: true });
|
|
417
448
|
const paywallRaw = flagString(parsed, "paywall")?.replace(/[$,]/g, "");
|
|
418
449
|
const paywall = paywallRaw === undefined ? undefined : Number(paywallRaw);
|
|
419
450
|
if (paywall !== undefined && (!Number.isFinite(paywall) || paywall <= 0)) {
|
|
@@ -437,6 +468,9 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
437
468
|
const body = {
|
|
438
469
|
...(plan ? { plan: plan } : {}),
|
|
439
470
|
...(dropAgreement ? { noAgreement: true } : {}),
|
|
471
|
+
...(hasFlag(parsed, "override-aid-price")
|
|
472
|
+
? { overrideAidPrice: true }
|
|
473
|
+
: {}),
|
|
440
474
|
...(offlinePaywall
|
|
441
475
|
? { paywallOutOfBand: true }
|
|
442
476
|
: paywallCents !== undefined
|
|
@@ -456,6 +490,57 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
456
490
|
return json ? result : { help: await render(result.packet) };
|
|
457
491
|
});
|
|
458
492
|
}
|
|
493
|
+
if (verb === "attach-aid") {
|
|
494
|
+
// A financial aid form that arrived after the packet went out. The price
|
|
495
|
+
// is not changed here; when the review disagrees with the plan the packet
|
|
496
|
+
// is flagged for a requote, which also puts the aid answers in the envelope.
|
|
497
|
+
const packetId = positional(parsed, 2, "packet ID");
|
|
498
|
+
const raw = flagString(parsed, "financial-aid", { required: true }).trim();
|
|
499
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
500
|
+
if (raw !== "none" && !UUID.test(raw)) {
|
|
501
|
+
throw new CliError("invalid_arguments", "--financial-aid takes a financial aid application id, or none to detach.");
|
|
502
|
+
}
|
|
503
|
+
const financialAidApplicationId = raw === "none" ? null : raw;
|
|
504
|
+
return writeCommand(parsed, {
|
|
505
|
+
action: financialAidApplicationId
|
|
506
|
+
? `attach financial aid application ${financialAidApplicationId} to admission packet ${packetId}`
|
|
507
|
+
: `detach the financial aid application from admission packet ${packetId}`,
|
|
508
|
+
target: { packetId },
|
|
509
|
+
request: { financialAidApplicationId },
|
|
510
|
+
}, async () => {
|
|
511
|
+
const result = unwrap(await api.client.POST("/admin/admissions/{packetId}/financial-aid", {
|
|
512
|
+
params: { path: { packetId } },
|
|
513
|
+
body: { financialAidApplicationId },
|
|
514
|
+
}));
|
|
515
|
+
if (json)
|
|
516
|
+
return result;
|
|
517
|
+
const p = result.packet;
|
|
518
|
+
const reviewed = p.financialAidApplication?.determinedAnnualTuition ?? null;
|
|
519
|
+
const annual = Number(p.planSpec.annualTuition);
|
|
520
|
+
const differs = reviewed !== null &&
|
|
521
|
+
p.kids.length === 1 &&
|
|
522
|
+
!p.noAgreement &&
|
|
523
|
+
Number.isFinite(annual) &&
|
|
524
|
+
annual !== reviewed;
|
|
525
|
+
return {
|
|
526
|
+
help: [
|
|
527
|
+
financialAidApplicationId ? "Attached." : "Detached.",
|
|
528
|
+
...(result.resigning
|
|
529
|
+
? [
|
|
530
|
+
"Signing had started, so the packet was requoted on its current plan: the family signs again with the new aid answers.",
|
|
531
|
+
]
|
|
532
|
+
: []),
|
|
533
|
+
...(differs
|
|
534
|
+
? [
|
|
535
|
+
`The aid review ($${reviewed.toLocaleString("en-US")}/yr) differs from the plan ($${annual.toLocaleString("en-US")}/yr). Requote to match: recess admissions requote ${packetId} --start ... (leave out --annual to use the review).`,
|
|
536
|
+
]
|
|
537
|
+
: []),
|
|
538
|
+
"",
|
|
539
|
+
await render(p),
|
|
540
|
+
].join("\n"),
|
|
541
|
+
};
|
|
542
|
+
});
|
|
543
|
+
}
|
|
459
544
|
if (verb === "archive-agreement") {
|
|
460
545
|
const packetId = positional(parsed, 2, "packet ID");
|
|
461
546
|
return writeCommand(parsed, {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { unwrap } from "../api.js";
|
|
2
|
+
import { flagNumber, flagString, hasFlag } from "../args.js";
|
|
3
|
+
import { CliError } from "../errors.js";
|
|
4
|
+
const MAX_DAILY_BUDGET_USD = 20;
|
|
5
|
+
function budgetFlag(context) {
|
|
6
|
+
const budget = flagNumber(context.parsed, "budget");
|
|
7
|
+
if (budget === undefined)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (budget <= 0 || budget > MAX_DAILY_BUDGET_USD) {
|
|
10
|
+
throw new CliError("invalid_arguments", `--budget must be more than 0 and at most ${MAX_DAILY_BUDGET_USD} (USD per day).`);
|
|
11
|
+
}
|
|
12
|
+
return budget;
|
|
13
|
+
}
|
|
14
|
+
function currentStatus(status) {
|
|
15
|
+
return {
|
|
16
|
+
role: status.role,
|
|
17
|
+
plan: status.plan,
|
|
18
|
+
eligible: status.eligible,
|
|
19
|
+
schoolTierId: status.schoolTierId,
|
|
20
|
+
viaFlag: status.viaFlag,
|
|
21
|
+
grant: status.grant,
|
|
22
|
+
dailyBudgetUsd: status.dailyBudgetUsd,
|
|
23
|
+
defaultDailyBudgetUsd: status.defaultDailyBudgetUsd,
|
|
24
|
+
todayUsd: status.days.find((day) => day.day === status.today)?.costUsd ?? 0,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export async function runRockyFreeCommand(context) {
|
|
28
|
+
const { parsed, api, writeCommand } = context;
|
|
29
|
+
const verb = parsed.positionals[2];
|
|
30
|
+
if (verb === "list") {
|
|
31
|
+
return unwrap(await api.client.GET("/tutor/free-rocky/grants"));
|
|
32
|
+
}
|
|
33
|
+
if (verb !== "get" &&
|
|
34
|
+
verb !== "grant" &&
|
|
35
|
+
verb !== "set-budget" &&
|
|
36
|
+
verb !== "revoke") {
|
|
37
|
+
throw new CliError("invalid_arguments", "Use rocky free list|get|grant|set-budget|revoke.");
|
|
38
|
+
}
|
|
39
|
+
const studentId = flagString(parsed, "student", { required: true });
|
|
40
|
+
const status = unwrap(await api.client.GET("/tutor/students/{studentId}/free-rocky", {
|
|
41
|
+
params: { path: { studentId } },
|
|
42
|
+
}));
|
|
43
|
+
if (verb === "get")
|
|
44
|
+
return status;
|
|
45
|
+
const putBudget = (dailyBudgetUsd) => async () => unwrap(await api.client.PUT("/tutor/students/{studentId}/free-rocky", {
|
|
46
|
+
params: { path: { studentId } },
|
|
47
|
+
body: { dailyBudgetUsd },
|
|
48
|
+
}));
|
|
49
|
+
if (verb === "grant") {
|
|
50
|
+
if (hasFlag(parsed, "default")) {
|
|
51
|
+
throw new CliError("invalid_arguments", "grant takes --budget or nothing (the default budget); --default is for set-budget.");
|
|
52
|
+
}
|
|
53
|
+
const dailyBudgetUsd = budgetFlag(context) ?? null;
|
|
54
|
+
const alreadyGranted = status.grant?.active === true;
|
|
55
|
+
return writeCommand(parsed, {
|
|
56
|
+
action: alreadyGranted
|
|
57
|
+
? "change the daily budget of this user's existing free Rocky grant"
|
|
58
|
+
: "grant free Rocky to this user",
|
|
59
|
+
target: { studentUserId: studentId },
|
|
60
|
+
request: { dailyBudgetUsd },
|
|
61
|
+
details: {
|
|
62
|
+
current: currentStatus(status),
|
|
63
|
+
warnings: status.warnings,
|
|
64
|
+
budgetAfterUsd: dailyBudgetUsd ?? status.defaultDailyBudgetUsd,
|
|
65
|
+
budgetSource: dailyBudgetUsd === null ? "default" : "custom",
|
|
66
|
+
consequences: [
|
|
67
|
+
alreadyGranted
|
|
68
|
+
? "The grant is already active: only its daily budget changes; grantedAt and grantedBy stay."
|
|
69
|
+
: "Starts a new grant stamped with you as grantedBy; a revoked grant is re-granted.",
|
|
70
|
+
"ADMIN-only (exact-admin): a GUIDE session gets 403.",
|
|
71
|
+
],
|
|
72
|
+
reverse: `\`rocky free revoke --student ${studentId}\``,
|
|
73
|
+
},
|
|
74
|
+
}, putBudget(dailyBudgetUsd));
|
|
75
|
+
}
|
|
76
|
+
if (!status.grant?.active) {
|
|
77
|
+
throw new CliError("not_found", `User ${studentId} has no active free Rocky grant${status.viaFlag ? " (free Rocky comes from the feature flag, not a grant)" : ""}. Use rocky free grant.`);
|
|
78
|
+
}
|
|
79
|
+
if (verb === "set-budget") {
|
|
80
|
+
const budget = budgetFlag(context);
|
|
81
|
+
const useDefault = hasFlag(parsed, "default");
|
|
82
|
+
if ((budget === undefined) === !useDefault) {
|
|
83
|
+
throw new CliError("invalid_arguments", "Pass exactly one of --budget <usd> or --default.");
|
|
84
|
+
}
|
|
85
|
+
const dailyBudgetUsd = budget ?? null;
|
|
86
|
+
return writeCommand(parsed, {
|
|
87
|
+
action: "change the daily budget of this user's free Rocky grant",
|
|
88
|
+
target: { studentUserId: studentId },
|
|
89
|
+
request: { dailyBudgetUsd },
|
|
90
|
+
details: {
|
|
91
|
+
current: currentStatus(status),
|
|
92
|
+
warnings: status.warnings,
|
|
93
|
+
budgetBeforeUsd: status.dailyBudgetUsd,
|
|
94
|
+
budgetAfterUsd: dailyBudgetUsd ?? status.defaultDailyBudgetUsd,
|
|
95
|
+
budgetSource: dailyBudgetUsd === null ? "default" : "custom",
|
|
96
|
+
},
|
|
97
|
+
}, putBudget(dailyBudgetUsd));
|
|
98
|
+
}
|
|
99
|
+
return writeCommand(parsed, {
|
|
100
|
+
action: "revoke this user's free Rocky grant",
|
|
101
|
+
target: { studentUserId: studentId },
|
|
102
|
+
request: {},
|
|
103
|
+
details: {
|
|
104
|
+
current: currentStatus(status),
|
|
105
|
+
warnings: status.warnings,
|
|
106
|
+
consequences: [
|
|
107
|
+
status.viaFlag
|
|
108
|
+
? "The feature flag still gives this user free Rocky after the revoke."
|
|
109
|
+
: "Free Rocky stops for this user right away.",
|
|
110
|
+
"The grant row is kept (revokedAt/revokedBy); `rocky free grant` re-grants it.",
|
|
111
|
+
"ADMIN-only (exact-admin): a GUIDE session gets 403.",
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
}, async () => unwrap(await api.client.DELETE("/tutor/students/{studentId}/free-rocky", {
|
|
115
|
+
params: { path: { studentId } },
|
|
116
|
+
})));
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=rocky-free.js.map
|
|
@@ -105,14 +105,14 @@ function renderPlan(plan, webUrl, pdfPath) {
|
|
|
105
105
|
out.push(`PDF: ${pdfPath}`);
|
|
106
106
|
return out.join("\n");
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (!Number.isFinite(annual) || annual <= 0) {
|
|
108
|
+
export function parseTuitionPlanSpecFlags(parsed, options) {
|
|
109
|
+
const annualRaw = options?.annualOptional && flagString(parsed, "annual") === undefined
|
|
110
|
+
? undefined
|
|
111
|
+
: requiredFlag(parsed, "annual");
|
|
112
|
+
const annual = annualRaw === undefined
|
|
113
|
+
? undefined
|
|
114
|
+
: Number(annualRaw.replace(/[$,]/g, ""));
|
|
115
|
+
if (annual !== undefined && (!Number.isFinite(annual) || annual <= 0)) {
|
|
116
116
|
throw new CliError("invalid_arguments", "--annual must be a positive dollar amount (net of Recess financial aid).");
|
|
117
117
|
}
|
|
118
118
|
// Add-on overrides; omitted = the server's school-pricing defaults.
|
|
@@ -256,7 +256,7 @@ export function parseTuitionPlanSpecFlags(parsed) {
|
|
|
256
256
|
};
|
|
257
257
|
return {
|
|
258
258
|
startDate: requiredFlag(parsed, "start", ISO_DATE),
|
|
259
|
-
annualTuition: annual,
|
|
259
|
+
...(annual !== undefined ? { annualTuition: annual } : {}),
|
|
260
260
|
stateFunding: hasFlag(parsed, "state-funding") ? "true" : "false",
|
|
261
261
|
...addOnQuery,
|
|
262
262
|
...subsetQuery,
|
package/dist/help.js
CHANGED
|
@@ -271,7 +271,7 @@ Usage:
|
|
|
271
271
|
[--application <application-id>]
|
|
272
272
|
[--financial-aid <financial-aid-application-id>|none]
|
|
273
273
|
[--tier complete] [--paywall DOLLARS|--paywall-offline] [--staff-note TEXT]... [--no-email]
|
|
274
|
-
(--no-agreement | --start YYYY-MM-DD --annual DOLLARS) [--state-funding] [--end YYYY-MM-DD]
|
|
274
|
+
(--no-agreement | --start YYYY-MM-DD [--annual DOLLARS] [--override-aid-price]) [--state-funding] [--end YYYY-MM-DD]
|
|
275
275
|
[--terms full-year,school-year,custom] [--payments upfront,installments] [--note TEXT]...
|
|
276
276
|
[--bill-date upfront|N=YYYY-MM-DD]... [--due-date upfront|N=YYYY-MM-DD]... [--amount N=DOLLARS]... [--even-installments] [--force-direct]
|
|
277
277
|
[--esa-award DOLLARS | --esa-award-unknown [--esa-scenarios DOLLARS,...]] [--custom-plan JSON|@file] [--custom-only]
|
|
@@ -282,9 +282,10 @@ Usage:
|
|
|
282
282
|
recess [--json] admissions resend <packet-id> [--no-email] [--confirm]
|
|
283
283
|
recess [--json] admissions void <packet-id> --reason TEXT [--confirm]
|
|
284
284
|
recess [--json] admissions mark-signed <packet-id> --option <term:payment> [--note TEXT] [--confirm]
|
|
285
|
-
recess [--json] admissions requote <packet-id> (--keep-plan | --no-agreement | --start YYYY-MM-DD --annual DOLLARS [plan flags as in create])
|
|
285
|
+
recess [--json] admissions requote <packet-id> (--keep-plan | --no-agreement | --start YYYY-MM-DD [--annual DOLLARS] [--override-aid-price] [plan flags as in create])
|
|
286
286
|
[--paywall DOLLARS|--paywall-offline|--no-paywall] [--note TEXT] [--confirm]
|
|
287
287
|
recess [--json] admissions archive-agreement <packet-id> [--confirm]
|
|
288
|
+
recess [--json] admissions attach-aid <packet-id> --financial-aid <financial-aid-application-id>|none [--confirm]
|
|
288
289
|
recess [--json] admissions mark-paid <packet-id> [--note TEXT] [--confirm]
|
|
289
290
|
recess [--json] admissions set-paywall <packet-id> (--paywall DOLLARS | --paywall-offline | --no-paywall) [--note TEXT] [--confirm]
|
|
290
291
|
recess [--json] admissions contract <packet-id> [--option <term:payment>] [--out <file>]
|
|
@@ -593,6 +594,12 @@ Usage:
|
|
|
593
594
|
recess [--json] rocky get --student <kid-id>
|
|
594
595
|
recess [--json] rocky set --student <kid-id> --patch-file <path/patch.json>
|
|
595
596
|
[--expected-updated-at ISO|none] [--confirm]
|
|
597
|
+
recess [--json] rocky free list
|
|
598
|
+
recess [--json] rocky free get --student <user-id>
|
|
599
|
+
recess [--json] rocky free grant --student <user-id> [--budget <usd>] [--confirm]
|
|
600
|
+
recess [--json] rocky free set-budget --student <user-id> (--budget <usd> | --default)
|
|
601
|
+
[--confirm]
|
|
602
|
+
recess [--json] rocky free revoke --student <user-id> [--confirm]
|
|
596
603
|
recess [--json] tutor-templates list [--q TEXT] [--subject TEXT] [--grade N]
|
|
597
604
|
recess [--json] tutor-templates get <slug>
|
|
598
605
|
recess [--json] tutor-templates assign <slug> [--student <kid-id>] [--confirm]
|
|
@@ -932,7 +939,12 @@ instead of creating one: the kid must be in the family of the guardian who owns
|
|
|
932
939
|
--email, the parent signs in with that account to start, and the kid's account,
|
|
933
940
|
tier and history are left as they are. The envelope opens with the family's financial aid answers
|
|
934
941
|
for them to initial as true; they come from --financial-aid, else the application's
|
|
935
|
-
aid form, else the newest aid form under the parent's email ("none" leaves it out)
|
|
942
|
+
aid form, else the newest aid form under the parent's email ("none" leaves it out); create
|
|
943
|
+
prints which one it attached and warns when it was an email match. The plan's price comes
|
|
944
|
+
from that aid form's review: leave --annual out and the reviewed annual (after Recess aid)
|
|
945
|
+
is used for a one-child packet (the review is the family's total; with more children give
|
|
946
|
+
the per-child --annual); an --annual that differs from a reviewed price is refused unless
|
|
947
|
+
--override-aid-price is given (requote checks the packet's aid form the same way). "resend" mints a new link (the old one dies) and emails
|
|
936
948
|
it. "get" prints the agreed plan as signed (each child's option, term and every
|
|
937
949
|
installment) and whether the signed agreement is archived in our storage; the
|
|
938
950
|
copy is taken when the envelope completes, and "archive-agreement" retries it.
|
|
@@ -1390,6 +1402,11 @@ export const COMMAND_SUMMARIES = {
|
|
|
1390
1402
|
"memories log": "Read a kid's memory log for a date.",
|
|
1391
1403
|
"rocky get": "Read a kid's Rocky personality settings.",
|
|
1392
1404
|
"rocky set": "Patch a kid's Rocky personality settings.",
|
|
1405
|
+
"rocky free list": "List everyone with an active free Rocky grant.",
|
|
1406
|
+
"rocky free get": "Read a user's free Rocky plan, grant, budget, and usage.",
|
|
1407
|
+
"rocky free grant": "Grant free Rocky to a kid or guardian.",
|
|
1408
|
+
"rocky free set-budget": "Change a free Rocky grant's daily budget.",
|
|
1409
|
+
"rocky free revoke": "Revoke a user's free Rocky grant.",
|
|
1393
1410
|
"tutor-templates list": "List tutor templates.",
|
|
1394
1411
|
"tutor-templates get": "Read one tutor template.",
|
|
1395
1412
|
"tutor-templates assign": "Assign a tutor template to a kid.",
|
|
@@ -1455,7 +1472,7 @@ export const NOUN_SUMMARIES = {
|
|
|
1455
1472
|
goals: "Kids' goals: create/edit, queue, workspace files, PDFs, videos.",
|
|
1456
1473
|
todos: "Kids' todos: create, edit, complete, analysis, applets.",
|
|
1457
1474
|
memories: "Kid memory files and the context Rocky sees.",
|
|
1458
|
-
rocky: "A kid's Rocky personality settings.",
|
|
1475
|
+
rocky: "A kid's Rocky personality settings; free Rocky grants and budgets.",
|
|
1459
1476
|
"tutor-templates": "Tutor templates and their assignment to kids.",
|
|
1460
1477
|
"library-books": "Book library: search the web, add books, read status.",
|
|
1461
1478
|
mastery: "Mastery graphs and the content linked to them.",
|