@htilabs/platform-common-models 0.85.0 → 0.86.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.
@@ -691,9 +691,21 @@ declare function organizationSchemaIssues(schema: Schema, extraKeys?: readonly s
691
691
  * type is offered, whose site a program may name) live with the pure reader
692
692
  * `../orgDirectory/programDetails.ts`.
693
693
  *
694
+ * ## The team link (0.86.0)
695
+ *
696
+ * `teamId` and `teamIds` are the UDD Program object's `team_id` · `team_ids`
697
+ * (canon platform-prototype `src/agencyhub.jsx` `roElevateProgramToTeam`,
698
+ * `linkTeamToProgramH`): which team or teams work for the program. One program
699
+ * may have several teams (Crysta 2026-10-18, "One program, two teams"):
700
+ * `teamIds` lists every linked team, `teamId` is the first of them. Both are
701
+ * optional; absent means no team is linked, as before. Stored camelCase like
702
+ * the rest of the row. Declaring them here is what keeps them: the strict
703
+ * sub-schema dropped them on cast, so a link written today was erased by the
704
+ * next program edit. Nothing reads them yet.
705
+ *
694
706
  * Still NOT on the row (UDD columns production does not store yet):
695
- * `agency_id`, `app`, `team_id` / `team_ids`, `grant_id` (derived from the
696
- * dated award link), `can_refer_to`, `enrollment_subtypes`.
707
+ * `agency_id`, `app`, `grant_id` (derived from the dated award link),
708
+ * `can_refer_to`, `enrollment_subtypes`.
697
709
  *
698
710
  * ## Who dedupes
699
711
  *
@@ -816,6 +828,24 @@ declare const organizationProgramSchemaDefinition: {
816
828
  readonly type: StringConstructor;
817
829
  readonly required: false;
818
830
  };
831
+ /**
832
+ * The first team that works for the program (`teams._id` as a string;
833
+ * canon `team_id`). Equal to `teamIds[0]` when both are written.
834
+ */
835
+ readonly teamId: {
836
+ readonly type: StringConstructor;
837
+ readonly required: false;
838
+ };
839
+ /**
840
+ * Every team that works for the program (canon `team_ids`; one program may
841
+ * have several teams). `default: undefined`, so a row with no link stores
842
+ * nothing and reads as absent, never as an empty list.
843
+ */
844
+ readonly teamIds: {
845
+ readonly type: readonly [StringConstructor];
846
+ readonly required: false;
847
+ readonly default: undefined;
848
+ };
819
849
  };
820
850
  /**
821
851
  * Build the program sub-schema. `{ _id: false }` — a program is identified by
@@ -691,9 +691,21 @@ declare function organizationSchemaIssues(schema: Schema, extraKeys?: readonly s
691
691
  * type is offered, whose site a program may name) live with the pure reader
692
692
  * `../orgDirectory/programDetails.ts`.
693
693
  *
694
+ * ## The team link (0.86.0)
695
+ *
696
+ * `teamId` and `teamIds` are the UDD Program object's `team_id` · `team_ids`
697
+ * (canon platform-prototype `src/agencyhub.jsx` `roElevateProgramToTeam`,
698
+ * `linkTeamToProgramH`): which team or teams work for the program. One program
699
+ * may have several teams (Crysta 2026-10-18, "One program, two teams"):
700
+ * `teamIds` lists every linked team, `teamId` is the first of them. Both are
701
+ * optional; absent means no team is linked, as before. Stored camelCase like
702
+ * the rest of the row. Declaring them here is what keeps them: the strict
703
+ * sub-schema dropped them on cast, so a link written today was erased by the
704
+ * next program edit. Nothing reads them yet.
705
+ *
694
706
  * Still NOT on the row (UDD columns production does not store yet):
695
- * `agency_id`, `app`, `team_id` / `team_ids`, `grant_id` (derived from the
696
- * dated award link), `can_refer_to`, `enrollment_subtypes`.
707
+ * `agency_id`, `app`, `grant_id` (derived from the dated award link),
708
+ * `can_refer_to`, `enrollment_subtypes`.
697
709
  *
698
710
  * ## Who dedupes
699
711
  *
@@ -816,6 +828,24 @@ declare const organizationProgramSchemaDefinition: {
816
828
  readonly type: StringConstructor;
817
829
  readonly required: false;
818
830
  };
831
+ /**
832
+ * The first team that works for the program (`teams._id` as a string;
833
+ * canon `team_id`). Equal to `teamIds[0]` when both are written.
834
+ */
835
+ readonly teamId: {
836
+ readonly type: StringConstructor;
837
+ readonly required: false;
838
+ };
839
+ /**
840
+ * Every team that works for the program (canon `team_ids`; one program may
841
+ * have several teams). `default: undefined`, so a row with no link stores
842
+ * nothing and reads as absent, never as an empty list.
843
+ */
844
+ readonly teamIds: {
845
+ readonly type: readonly [StringConstructor];
846
+ readonly required: false;
847
+ readonly default: undefined;
848
+ };
819
849
  };
820
850
  /**
821
851
  * Build the program sub-schema. `{ _id: false }` — a program is identified by
@@ -6133,7 +6133,18 @@ var organizationProgramSchemaDefinition = {
6133
6133
  */
6134
6134
  locationId: { type: String, required: false },
6135
6135
  /** The editor's notes. */
6136
- notes: { type: String, required: false }
6136
+ notes: { type: String, required: false },
6137
+ /**
6138
+ * The first team that works for the program (`teams._id` as a string;
6139
+ * canon `team_id`). Equal to `teamIds[0]` when both are written.
6140
+ */
6141
+ teamId: { type: String, required: false },
6142
+ /**
6143
+ * Every team that works for the program (canon `team_ids`; one program may
6144
+ * have several teams). `default: undefined`, so a row with no link stores
6145
+ * nothing and reads as absent, never as an empty list.
6146
+ */
6147
+ teamIds: { type: [String], required: false, default: void 0 }
6137
6148
  };
6138
6149
  function buildOrganizationProgramSchema() {
6139
6150
  return new Schema12(organizationProgramSchemaDefinition, { _id: false });