@cyc-seattle/platform 1.31.0 → 1.33.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/README.md +5 -3
- package/dist/planning/activities.js +2 -2
- package/dist/planning/engine.js +0 -8
- package/dist/planning/types.d.ts +2 -4
- package/dist/schema/index.d.ts +73 -79
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,9 +107,11 @@ GitHub environment that holds its identity and state bucket:
|
|
|
107
107
|
| Run by hand, from a branch | `ci`, then `dev` |
|
|
108
108
|
| Run by hand, from `main` | `prod-preview`, then `prod` |
|
|
109
109
|
|
|
110
|
-
Dev is shared, so only the merge queue deploys to it
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
Dev is shared, so only the merge queue deploys to it (#69, #80). PRs queued together deploy and
|
|
111
|
+
test as one batch: each queued PR's run skips dev when a newer PR is queued behind it, and the newest
|
|
112
|
+
tests them all. The queue requires `dev-passed`, so a batch merges only once its dev deploy and the
|
|
113
|
+
integration tests pass, and `main` gets the exact commit the queue tested, in one push. If the
|
|
114
|
+
newest PR fails, the queue drops it and the rest of the batch deploys without it. A queued PR of only docs or CI skips `dev`. To try a
|
|
113
115
|
branch on dev before queueing it, run `gh workflow run pull-request.yml --ref <branch>`.
|
|
114
116
|
|
|
115
117
|
`prod-preview` runs `mise run preview` as `deploy-runner` and writes the diff to the job summary.
|
|
@@ -7,7 +7,7 @@ export function scheduleActivities(ctx) {
|
|
|
7
7
|
const trips = new Map(ctx.data.plan_trips.map((t) => [t.id, t]));
|
|
8
8
|
const closed = new Map();
|
|
9
9
|
for (const c of ctx.data.plan_closed_dates ?? []) {
|
|
10
|
-
// The
|
|
10
|
+
// The closed days are the Operations Plan's, not an area's.
|
|
11
11
|
if (ctx.planOfVersion.get(c.version_id)?.kind === "program_area") {
|
|
12
12
|
ctx.warn("closed_date_in_area_plan", `${c.name} is a closed day in a program area's plan, so it's ignored`, c.key);
|
|
13
13
|
continue;
|
|
@@ -32,7 +32,7 @@ export function scheduleActivities(ctx) {
|
|
|
32
32
|
const span = start !== null && end !== null ? end - start : 0;
|
|
33
33
|
const closedFor = closed.get(activity.date);
|
|
34
34
|
if (closedFor !== undefined && activity.kind !== "travel") {
|
|
35
|
-
ctx.warn("closed_date", `${offering.name} has an activity on ${activity.date},
|
|
35
|
+
ctx.warn("closed_date", `${offering.name} has an activity on ${activity.date}, a closed day: ${closedFor}`, activity.key);
|
|
36
36
|
}
|
|
37
37
|
const usesBoats = activity.kind !== "travel" && activity.uses_boats;
|
|
38
38
|
result.push({
|
package/dist/planning/engine.js
CHANGED
|
@@ -66,14 +66,6 @@ function checkAreas(ctx) {
|
|
|
66
66
|
ctx.warn("offering_in_wrong_plan", `Offering ${offering.name} of ${product.name} is in ${where}`, offering.key);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
const operations = new Set(ctx.data.plan_versions.filter((v) => ctx.planOfVersion.get(v.id)?.kind === "operations").map((v) => v.id));
|
|
70
|
-
for (const version of ctx.data.plan_versions) {
|
|
71
|
-
const pinned = version.operations_version_id;
|
|
72
|
-
if (pinned == null || operations.size === 0 || operations.has(pinned))
|
|
73
|
-
continue;
|
|
74
|
-
const area = ctx.areas.get(ctx.planOfVersion.get(version.id)?.program_area_id ?? "");
|
|
75
|
-
ctx.warn("other_operations_version", `${area?.name ?? "A program area"}'s plan was saved with a different Operations Plan version from the one it's calculated with`, version.id);
|
|
76
|
-
}
|
|
77
69
|
}
|
|
78
70
|
/** Each salaried position's year: its salary, where its hours went, and its hourly wages and bonus. */
|
|
79
71
|
function summarizePositions(ctx, coaching, charged, bonuses, doubleBooked) {
|
package/dist/planning/types.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface Product {
|
|
|
23
23
|
/** Every program has one; merchandise, storage and charters have none. */
|
|
24
24
|
program_area_id: Id | null;
|
|
25
25
|
}
|
|
26
|
-
/** A part of the
|
|
26
|
+
/** A part of the organization's programs, such as Summer, with its revenue account. */
|
|
27
27
|
export interface ProgramArea {
|
|
28
28
|
id: Id;
|
|
29
29
|
name: string;
|
|
@@ -83,8 +83,6 @@ export interface Plan {
|
|
|
83
83
|
export interface PlanVersion {
|
|
84
84
|
id: Id;
|
|
85
85
|
plan_id: Id;
|
|
86
|
-
/** A saved area plan's: the Operations Plan version it was saved with. */
|
|
87
|
-
operations_version_id?: Id | null;
|
|
88
86
|
}
|
|
89
87
|
export type ActivityKind = "practice" | "regatta" | "clinic" | "travel";
|
|
90
88
|
export interface PlanOffering extends Versioned {
|
|
@@ -265,7 +263,7 @@ export interface PlanRevenueCharge extends Versioned {
|
|
|
265
263
|
excluded_from_mtdc: boolean;
|
|
266
264
|
note: string | null;
|
|
267
265
|
}
|
|
268
|
-
/** A day the
|
|
266
|
+
/** A day the organization is closed, such as Labor Day. */
|
|
269
267
|
export interface PlanClosedDate extends Versioned {
|
|
270
268
|
date: DateString;
|
|
271
269
|
name: string;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface Schema {
|
|
|
3
3
|
accounts: Accounts[];
|
|
4
4
|
audit_findings: AuditFindings[];
|
|
5
5
|
boat_classes: BoatClasses[];
|
|
6
|
+
catalog_offerings: CatalogOfferings[];
|
|
6
7
|
clubspot_camps: ClubspotCamps[];
|
|
7
8
|
clubspot_classes: ClubspotClasses[];
|
|
8
9
|
clubspot_custom_field_definitions: ClubspotCustomFieldDefinitions[];
|
|
@@ -22,12 +23,12 @@ export interface Schema {
|
|
|
22
23
|
group_members: GroupMembers[];
|
|
23
24
|
group_policies: GroupPolicies[];
|
|
24
25
|
groups: Groups[];
|
|
26
|
+
households: Households[];
|
|
25
27
|
medical_profiles: MedicalProfiles[];
|
|
26
28
|
offerings: Offerings[];
|
|
27
29
|
organization_cost_accounts: OrganizationCostAccounts[];
|
|
28
30
|
organizations: Organizations[];
|
|
29
31
|
people: People[];
|
|
30
|
-
plan_activations: PlanActivations[];
|
|
31
32
|
plan_activities: PlanActivities[];
|
|
32
33
|
plan_activity_block_rules: PlanActivityBlockRules[];
|
|
33
34
|
plan_activity_resources: PlanActivityResources[];
|
|
@@ -45,7 +46,6 @@ export interface Schema {
|
|
|
45
46
|
plan_result_lines: PlanResultLines[];
|
|
46
47
|
plan_result_pnl: PlanResultPnl[];
|
|
47
48
|
plan_result_positions: PlanResultPositions[];
|
|
48
|
-
plan_result_versions: PlanResultVersions[];
|
|
49
49
|
plan_result_warnings: PlanResultWarnings[];
|
|
50
50
|
plan_results: PlanResults[];
|
|
51
51
|
plan_revenue_charges: PlanRevenueCharges[];
|
|
@@ -109,6 +109,14 @@ export interface BoatClasses {
|
|
|
109
109
|
/** Dry-storage area one boat takes. */
|
|
110
110
|
footprint_sq_ft: string | null;
|
|
111
111
|
}
|
|
112
|
+
/** An offering of a program that plans and Clubspot both point to, such as "J-Pod · fall practices" or "Summer camp · week 3". Each Financial Plan sets its own price, schedule, and size for it, and Clubspot's offerings are linked to it. */
|
|
113
|
+
export interface CatalogOfferings {
|
|
114
|
+
id: string;
|
|
115
|
+
/** The program it's an offering of. */
|
|
116
|
+
program_id: string | Programs;
|
|
117
|
+
/** Which offering of the program, such as "fall practices" or "week 3". */
|
|
118
|
+
name: string;
|
|
119
|
+
}
|
|
112
120
|
/** A dated event, such as a season's race team. Copied from Clubspot, so edit it there. */
|
|
113
121
|
export interface ClubspotCamps {
|
|
114
122
|
/** Clubspot's own ID for this row. */
|
|
@@ -364,6 +372,15 @@ export interface Groups {
|
|
|
364
372
|
/** The policies this group gives its members. */
|
|
365
373
|
policies: (string | GroupPolicies)[];
|
|
366
374
|
}
|
|
375
|
+
/** A sailor and everyone listed as their parent, together with the parents' other children. Made from the Clubspot sign-ups, so change who's in one by fixing the people and their parents. */
|
|
376
|
+
export interface Households {
|
|
377
|
+
id: string;
|
|
378
|
+
/** Everyone in the household. */
|
|
379
|
+
members: (string | People)[];
|
|
380
|
+
/** Whether the household's adults share their email and phone with the teams they're on. Blank means never answered, which counts as not shared. A child's own email and phone are never shared. */
|
|
381
|
+
share_contact: boolean | null;
|
|
382
|
+
date_created: string | null;
|
|
383
|
+
}
|
|
367
384
|
/** A person's medical information, kept apart from People so only some staff see it. */
|
|
368
385
|
export interface MedicalProfiles {
|
|
369
386
|
id: string;
|
|
@@ -428,25 +445,17 @@ export interface People {
|
|
|
428
445
|
/** Every email and phone known for this person. */
|
|
429
446
|
contact_point_links: (string | ContactPoints)[];
|
|
430
447
|
school: string | null;
|
|
431
|
-
/**
|
|
448
|
+
/** What this adult last answered before households held the answer. Kept for reference only: the household's answer counts now. */
|
|
432
449
|
share_contact: boolean | null;
|
|
433
450
|
/** What this person is signed up for. */
|
|
434
451
|
registrations: (string | Registrations)[];
|
|
452
|
+
/** The name the club's apps show, if the person or their family gave one. Blank shows the first and last name. */
|
|
453
|
+
display_name: string | null;
|
|
454
|
+
/** Set by the Clubspot sync from the person's parents and children, so change those instead. */
|
|
455
|
+
household_id: string | Households | null;
|
|
435
456
|
/** The person's own Directus login, if they have one. Usually empty. */
|
|
436
457
|
directus_user_id: string | null;
|
|
437
458
|
}
|
|
438
|
-
/** Each time a saved version was made active. A plan's newest activation is its active version. */
|
|
439
|
-
export interface PlanActivations {
|
|
440
|
-
id: string;
|
|
441
|
-
plan_id: string | Plans;
|
|
442
|
-
/** A saved version of the plan. */
|
|
443
|
-
version_id: string | PlanVersions;
|
|
444
|
-
/** Set when the version is made active. */
|
|
445
|
-
activated_at: string;
|
|
446
|
-
activated_by: string | null;
|
|
447
|
-
/** Set when the version is made active. The plan's active version is the one with the highest. */
|
|
448
|
-
sequence: number;
|
|
449
|
-
}
|
|
450
459
|
/** One dated activity, such as a practice, a regatta day, or a travel day. */
|
|
451
460
|
export interface PlanActivities {
|
|
452
461
|
id: string;
|
|
@@ -551,7 +560,7 @@ export interface PlanBudgetLines {
|
|
|
551
560
|
account_id: string | Accounts;
|
|
552
561
|
function: "program" | "management" | "fundraising" | null;
|
|
553
562
|
cost_center_type: "offering" | "product" | "program_area" | "pool" | "org";
|
|
554
|
-
/** Who the cost is charged to: copy the Key from an offering or a pool, or a product's ID from the end of its page's web address. Leave empty for the whole
|
|
563
|
+
/** Who the cost is charged to: copy the Key from an offering or a pool, or a product's ID from the end of its page's web address. Leave empty for the whole organization. */
|
|
555
564
|
cost_center_key: string | null;
|
|
556
565
|
/** In cents: 12500 is $125.00. */
|
|
557
566
|
amount_cents: number;
|
|
@@ -560,7 +569,7 @@ export interface PlanBudgetLines {
|
|
|
560
569
|
excluded_from_mtdc: boolean;
|
|
561
570
|
note: string | null;
|
|
562
571
|
}
|
|
563
|
-
/** A day the
|
|
572
|
+
/** A day the organization is closed, such as Labor Day. The P&L warns about an activity on one. */
|
|
564
573
|
export interface PlanClosedDates {
|
|
565
574
|
id: string;
|
|
566
575
|
/** The version this row belongs to. */
|
|
@@ -580,7 +589,7 @@ export interface PlanLaborLines {
|
|
|
580
589
|
key: string;
|
|
581
590
|
name: string;
|
|
582
591
|
cost_center_type: "offering" | "product" | "program_area" | "pool" | "org";
|
|
583
|
-
/** Who the cost is charged to: copy the Key from an offering or a pool, or a product's ID from the end of its page's web address. Leave empty for the whole
|
|
592
|
+
/** Who the cost is charged to: copy the Key from an offering or a pool, or a product's ID from the end of its page's web address. Leave empty for the whole organization. */
|
|
584
593
|
cost_center_key: string | null;
|
|
585
594
|
/** Who does the work: copy the Key from a staff level in the Operations Plan. */
|
|
586
595
|
staff_level_key: string;
|
|
@@ -609,6 +618,8 @@ export interface PlanOfferings {
|
|
|
609
618
|
/** Stays the same across versions. Copy it where another row asks for this one's Key. */
|
|
610
619
|
key: string;
|
|
611
620
|
product_id: string | Products;
|
|
621
|
+
/** Which of the program's catalog offerings this is, such as "J-Pod · fall practices". It's how Clubspot's sign-ups find it, in every Financial Plan. */
|
|
622
|
+
catalog_offering_id: string | CatalogOfferings | null;
|
|
612
623
|
name: string;
|
|
613
624
|
season_term: string | null;
|
|
614
625
|
starts_on: string;
|
|
@@ -651,7 +662,7 @@ export interface PlanPools {
|
|
|
651
662
|
key: string;
|
|
652
663
|
name: string;
|
|
653
664
|
}
|
|
654
|
-
/** The year's rates. One row at most in each
|
|
665
|
+
/** The year's rates. One row at most in each copy. */
|
|
655
666
|
export interface PlanRates {
|
|
656
667
|
id: string;
|
|
657
668
|
/** The version this row belongs to. */
|
|
@@ -688,11 +699,9 @@ export interface PlanResources {
|
|
|
688
699
|
/** Set for a rental, whose cost is left out of modified total direct costs (MTDC). */
|
|
689
700
|
excluded_from_mtdc: boolean;
|
|
690
701
|
}
|
|
691
|
-
/** Each cost and revenue line in a saved
|
|
702
|
+
/** Each cost and revenue line in a saved Financial Plan's P&L. Worked out when it was saved, and never changed. */
|
|
692
703
|
export interface PlanResultLines {
|
|
693
704
|
id: string;
|
|
694
|
-
/** The saved version these results are for, if they aren't a club plan's. */
|
|
695
|
-
version_id: string | PlanVersions | null;
|
|
696
705
|
cost_center_type: "offering" | "product" | "program_area" | "pool" | "org";
|
|
697
706
|
cost_center_key: string | null;
|
|
698
707
|
cost_center_name: string;
|
|
@@ -703,18 +712,16 @@ export interface PlanResultLines {
|
|
|
703
712
|
/** The engine's key for the line. */
|
|
704
713
|
line: string;
|
|
705
714
|
explanation: string | null;
|
|
706
|
-
/** The
|
|
707
|
-
version_set_id: string | VersionSets
|
|
708
|
-
/**
|
|
715
|
+
/** The Financial Plan these results are for. */
|
|
716
|
+
version_set_id: string | VersionSets;
|
|
717
|
+
/** The plan in the Financial Plan that holds what it's charged to. */
|
|
709
718
|
version_set_member_id: string | VersionSetMembers | null;
|
|
710
719
|
/** What the line is, in plain words, such as G&A share: Payroll tax. */
|
|
711
720
|
line_name: string | null;
|
|
712
721
|
}
|
|
713
|
-
/** A saved
|
|
722
|
+
/** A saved Financial Plan's P&L for each offering, product, and program area. Worked out when it was saved, and never changed. */
|
|
714
723
|
export interface PlanResultPnl {
|
|
715
724
|
id: string;
|
|
716
|
-
/** The saved version these results are for, if they aren't a club plan's. */
|
|
717
|
-
version_id: string | PlanVersions | null;
|
|
718
725
|
level: "offering" | "product" | "program_area";
|
|
719
726
|
subject_key: string;
|
|
720
727
|
name: string;
|
|
@@ -729,16 +736,14 @@ export interface PlanResultPnl {
|
|
|
729
736
|
enrollment: number;
|
|
730
737
|
days: number;
|
|
731
738
|
sailor_days: number;
|
|
732
|
-
/** The
|
|
733
|
-
version_set_id: string | VersionSets
|
|
734
|
-
/**
|
|
739
|
+
/** The Financial Plan these results are for. */
|
|
740
|
+
version_set_id: string | VersionSets;
|
|
741
|
+
/** The plan in the Financial Plan that holds what it's charged to. */
|
|
735
742
|
version_set_member_id: string | VersionSetMembers | null;
|
|
736
743
|
}
|
|
737
|
-
/** Each salaried position's pay for the year, in a saved
|
|
744
|
+
/** Each salaried position's pay for the year, in a saved Financial Plan. Worked out when it was saved, and never changed. */
|
|
738
745
|
export interface PlanResultPositions {
|
|
739
746
|
id: string;
|
|
740
|
-
/** The saved version these results are for, if they aren't a club plan's. */
|
|
741
|
-
version_id: string | PlanVersions | null;
|
|
742
747
|
position_key: string;
|
|
743
748
|
name: string;
|
|
744
749
|
/** In cents: 12500 is $125.00. */
|
|
@@ -758,38 +763,26 @@ export interface PlanResultPositions {
|
|
|
758
763
|
total_pay_cents: number;
|
|
759
764
|
/** The year's payroll tax on the total pay. In cents: 12500 is $125.00. */
|
|
760
765
|
payroll_tax_cents: number;
|
|
761
|
-
/** The
|
|
762
|
-
version_set_id: string | VersionSets
|
|
766
|
+
/** The Financial Plan these results are for. */
|
|
767
|
+
version_set_id: string | VersionSets;
|
|
763
768
|
/** Hours another coach would cover while this position coaches two or more groups at once: for three groups at once, two coaches. */
|
|
764
769
|
double_booked_hours: string | null;
|
|
765
770
|
/** Dates this position coaches two or more groups at once. */
|
|
766
771
|
double_booked_dates: number | null;
|
|
767
772
|
}
|
|
768
|
-
/**
|
|
769
|
-
export interface PlanResultVersions {
|
|
770
|
-
id: string;
|
|
771
|
-
/** The saved version these results are for. */
|
|
772
|
-
version_id: string | PlanVersions;
|
|
773
|
-
/** Another saved version in the club's plan when this one was saved. */
|
|
774
|
-
calculated_with_id: string | PlanVersions;
|
|
775
|
-
}
|
|
776
|
-
/** What the P&L warned about when a version was saved. Worked out when the version was saved, and never changed. */
|
|
773
|
+
/** What the P&L warned about when a Financial Plan was saved. Worked out when it was saved, and never changed. */
|
|
777
774
|
export interface PlanResultWarnings {
|
|
778
775
|
id: string;
|
|
779
|
-
/** The saved version these results are for, if they aren't a club plan's. */
|
|
780
|
-
version_id: string | PlanVersions | null;
|
|
781
776
|
/** The kind of warning. */
|
|
782
777
|
code: string;
|
|
783
778
|
message: string;
|
|
784
779
|
subject_key: string | null;
|
|
785
|
-
/** The
|
|
786
|
-
version_set_id: string | VersionSets
|
|
780
|
+
/** The Financial Plan these results are for. */
|
|
781
|
+
version_set_id: string | VersionSets;
|
|
787
782
|
}
|
|
788
|
-
/** A saved
|
|
783
|
+
/** A saved Financial Plan's totals for the organization. Worked out when it was saved, and never changed. */
|
|
789
784
|
export interface PlanResults {
|
|
790
785
|
id: string;
|
|
791
|
-
/** The saved version these results are for, if they aren't a club plan's. */
|
|
792
|
-
version_id: string | PlanVersions | null;
|
|
793
786
|
calculated_at: string;
|
|
794
787
|
/** In cents: 12500 is $125.00. */
|
|
795
788
|
operating_revenue_cents: number;
|
|
@@ -807,8 +800,8 @@ export interface PlanResults {
|
|
|
807
800
|
capital_cents: number;
|
|
808
801
|
/** Operating net, plus fundraising net, less capital. In cents: 12500 is $125.00. */
|
|
809
802
|
total_cents: number;
|
|
810
|
-
/** The
|
|
811
|
-
version_set_id: string | VersionSets
|
|
803
|
+
/** The Financial Plan these results are for. */
|
|
804
|
+
version_set_id: string | VersionSets;
|
|
812
805
|
}
|
|
813
806
|
/** A charge set as a share of each offering's revenue, such as scholarships or card fees. Operations Plan only. */
|
|
814
807
|
export interface PlanRevenueCharges {
|
|
@@ -892,43 +885,39 @@ export interface PlanTrips {
|
|
|
892
885
|
airfare_cents: number | null;
|
|
893
886
|
miles: number | null;
|
|
894
887
|
}
|
|
895
|
-
/**
|
|
888
|
+
/** One plan's copy in one Financial Plan, with every row it holds. It's saved with its Financial Plan, and then never changes. */
|
|
896
889
|
export interface PlanVersions {
|
|
897
890
|
id: string;
|
|
898
891
|
plan_id: string | Plans;
|
|
899
|
-
/** The
|
|
892
|
+
/** The copy this one was made from, in the Financial Plan this one's started from. */
|
|
900
893
|
parent_version_id: string | PlanVersions | null;
|
|
901
|
-
/**
|
|
894
|
+
/** Saved with its Financial Plan. A saved copy never changes, even for an admin. */
|
|
902
895
|
status: "draft" | "saved";
|
|
903
896
|
/** What changed in this version. */
|
|
904
897
|
message: string | null;
|
|
905
|
-
/** Set when
|
|
898
|
+
/** Set when its Financial Plan is saved. */
|
|
906
899
|
saved_by: string | null;
|
|
907
|
-
/** Set when
|
|
900
|
+
/** Set when its Financial Plan is saved. */
|
|
908
901
|
saved_at: string | null;
|
|
909
902
|
/** The version of the planning engine that calculated its numbers. Required to save. */
|
|
910
903
|
platform_version: string | null;
|
|
911
|
-
/** For a program area's plan: the saved Operations Plan version its numbers were calculated with, for the same organization and year. Required to save. Empty for the Operations Plan. */
|
|
912
|
-
operations_version_id: string | PlanVersions | null;
|
|
913
904
|
/** What you want that the plan's numbers don't capture, for your AI to fill in. For example: every Monday, Wednesday and Friday, except on SPS school holidays, from 4pm until dusk. */
|
|
914
905
|
rules: string | null;
|
|
915
|
-
/** What the P&L showed when this version was saved, worked out a moment after it's saved. A saved version with none means working them out failed, and an admin can fill them in. */
|
|
916
|
-
results: (string | PlanResults)[];
|
|
917
906
|
}
|
|
918
|
-
/** One part of
|
|
907
|
+
/** One part of a Financial Plan: a program area's Program Plan, or the Operations Plan. */
|
|
919
908
|
export interface Plans {
|
|
920
909
|
id: string;
|
|
921
910
|
kind: "program_area" | "operations";
|
|
922
911
|
/** The program area the plan is for. Empty for the Operations Plan. */
|
|
923
912
|
program_area_id: string | ProgramAreas | null;
|
|
924
|
-
/** The organization the plan is for. Can't change once the plan has a saved
|
|
913
|
+
/** The organization the plan is for. Can't change once the plan has a saved copy. */
|
|
925
914
|
organization_id: string | Organizations;
|
|
926
|
-
/** The plan year. Fiscal year N ends in calendar year N. Can't change once the plan has a saved
|
|
915
|
+
/** The plan year. Fiscal year N ends in calendar year N. Can't change once the plan has a saved copy. */
|
|
927
916
|
fiscal_year: number;
|
|
928
917
|
name: string;
|
|
929
|
-
/** A plan with a saved
|
|
918
|
+
/** A plan with a saved copy can't be deleted, so archive it instead. */
|
|
930
919
|
archived: boolean;
|
|
931
|
-
/** The plan's
|
|
920
|
+
/** The plan's copy in each Financial Plan. */
|
|
932
921
|
versions: (string | PlanVersions)[];
|
|
933
922
|
}
|
|
934
923
|
/** A lasting thing the club sells. A program also has a row in Programs. */
|
|
@@ -1054,33 +1043,38 @@ export interface SyncTasks {
|
|
|
1054
1043
|
/** Set once the task has failed too many times. It keeps retrying; this flags it for staff. */
|
|
1055
1044
|
needs_attention: boolean;
|
|
1056
1045
|
}
|
|
1057
|
-
/** One plan
|
|
1046
|
+
/** One plan in a Financial Plan: the copy of the plan it holds. Add or remove one only while the Financial Plan is a draft. */
|
|
1058
1047
|
export interface VersionSetMembers {
|
|
1059
1048
|
id: string;
|
|
1060
1049
|
version_set_id: string | VersionSets;
|
|
1061
|
-
|
|
1062
|
-
|
|
1050
|
+
/** Filled in from the plan copy. */
|
|
1051
|
+
plan_id: string | Plans | null;
|
|
1052
|
+
/** The plan's copy in this Financial Plan. It's in no other Financial Plan. */
|
|
1063
1053
|
version_id: string | PlanVersions;
|
|
1064
1054
|
}
|
|
1065
|
-
/** The
|
|
1055
|
+
/** The organization's plan for a year: one Operations Plan, and a Program Plan for any of the program areas, with the P&L they make together. Change its plans while it's a draft. Saving it saves them all, and then it never changes, apart from its note. Pick a parent when you add one, and its plans are copied in. */
|
|
1066
1056
|
export interface VersionSets {
|
|
1067
1057
|
id: string;
|
|
1068
|
-
/** The organization the
|
|
1058
|
+
/** The organization the Financial Plan is for. */
|
|
1069
1059
|
organization_id: string | Organizations;
|
|
1070
|
-
/** The year the
|
|
1060
|
+
/** The year the Financial Plan is for. */
|
|
1071
1061
|
fiscal_year: number;
|
|
1072
1062
|
/** Such as 2027 budget as adopted. */
|
|
1073
1063
|
name: string;
|
|
1074
|
-
/**
|
|
1064
|
+
/** What it was for, such as "Reviewed with the board". You can change it after it's saved. */
|
|
1075
1065
|
message: string | null;
|
|
1076
|
-
/** Set
|
|
1066
|
+
/** Set it to saved to save the Financial Plan and all its plans. A saved Financial Plan never changes, apart from its note. Set a saved one to active to make it the one its organization runs for the year, which sets the one active before it back to saved. */
|
|
1067
|
+
status: "draft" | "saved" | "active";
|
|
1068
|
+
/** The Financial Plan this one started as a copy of. Pick it when you add this one, and its plans are copied in. */
|
|
1069
|
+
parent_id: string | VersionSets | null;
|
|
1070
|
+
/** Set when the Financial Plan is saved. */
|
|
1077
1071
|
saved_by: string | null;
|
|
1078
|
-
/** Set when the
|
|
1072
|
+
/** Set when the Financial Plan is saved. */
|
|
1079
1073
|
saved_at: string | null;
|
|
1080
1074
|
/** The version of the planning engine that calculated its numbers. */
|
|
1081
1075
|
platform_version: string | null;
|
|
1082
|
-
/**
|
|
1076
|
+
/** Each plan in the Financial Plan. Add or remove one only while it's a draft. */
|
|
1083
1077
|
members: (string | VersionSetMembers)[];
|
|
1084
|
-
/** What the
|
|
1078
|
+
/** What the organization's P&L showed when it was saved, worked out a moment after. A Financial Plan with none means working them out failed, and an admin can fill them in. */
|
|
1085
1079
|
results: (string | PlanResults)[];
|
|
1086
1080
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyc-seattle/platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "Pulumi components for CYC's shared Google Cloud platform: WebService, the platform outputs reader, and the stacks that build the platform",
|
|
5
5
|
"author": "CYC Community Sailing Center",
|
|
6
6
|
"license": "Apache-2.0",
|