@htilabs/platform-common-models 0.60.0 → 0.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.
Files changed (36) hide show
  1. package/README.md +81 -0
  2. package/dist/authz/index.cjs +104 -0
  3. package/dist/authz/index.cjs.map +1 -1
  4. package/dist/authz/index.d.cts +21 -1
  5. package/dist/authz/index.d.ts +21 -1
  6. package/dist/authz/index.js +101 -0
  7. package/dist/authz/index.js.map +1 -1
  8. package/dist/{index-DvAypMJV.d.ts → index-Bh1zO_Vu.d.ts} +1 -1
  9. package/dist/{index-Bj-s0nZy.d.cts → index-XWSYon40.d.cts} +1 -1
  10. package/dist/index.cjs +185 -7
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +3 -3
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +182 -7
  15. package/dist/index.js.map +1 -1
  16. package/dist/models/index.d.cts +2 -2
  17. package/dist/models/index.d.ts +2 -2
  18. package/dist/schemas/index.d.cts +25 -25
  19. package/dist/schemas/index.d.ts +25 -25
  20. package/dist/sharing-ceiling/index.cjs +81 -7
  21. package/dist/sharing-ceiling/index.cjs.map +1 -1
  22. package/dist/sharing-ceiling/index.d.cts +64 -4
  23. package/dist/sharing-ceiling/index.d.ts +64 -4
  24. package/dist/sharing-ceiling/index.js +81 -7
  25. package/dist/sharing-ceiling/index.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/__tests__/authz-resolve.test.ts +3 -0
  28. package/src/__tests__/core-function-notes.test.ts +35 -0
  29. package/src/authz/functionNotes.ts +20 -0
  30. package/src/authz/index.ts +1 -0
  31. package/src/generated/coreFunctionNotes.ts +107 -0
  32. package/src/sharingCeiling/__tests__/resolveShare.purposeRule.test.ts +836 -0
  33. package/src/sharingCeiling/index.ts +4 -0
  34. package/src/sharingCeiling/resolve.ts +219 -15
  35. package/dist/{cvcEntry-BLeRivoF.d.cts → cvcEntry-D787utvP.d.cts} +8 -8
  36. package/dist/{cvcEntry-BLeRivoF.d.ts → cvcEntry-D787utvP.d.ts} +8 -8
@@ -20,6 +20,10 @@
20
20
  *
21
21
  * 0.55.0 adds event-driven sharing's pure half (`ShareEvent`,
22
22
  * `fireShareEvent`, `shareListenersFor`; ./fireShareEvent.ts).
23
+ *
24
+ * 0.61.0 names the account's authored purpose-specific partner rule as the
25
+ * governing policy (`partnerPurposeRule` → the virtual `byPurpose` fork;
26
+ * ./resolve.ts).
23
27
  */
24
28
 
25
29
  export * from "./starter.js";
@@ -29,8 +29,27 @@
29
29
  * `sharing-four-state-k13.js` (A–C); the test suite beside this file carries
30
30
  * their vectors.
31
31
  *
32
+ * The `byPurpose` virtual fork (since 0.61.0; data.js `governingPolicyFor` @ aa2c63a
33
+ * L55006-L55028, "An authored byPurpose sub-row with no explicit attachment is the
34
+ * ruled fork-with-one-attachment"): when no policy is attached to the relationship
35
+ * for the purpose but the account has AUTHORED a purpose-specific rule for the
36
+ * partner (`partnerPurposeRule`), the governing policy is NAMED as that rule —
37
+ * `pol-bp-<partner>-<purpose>`, level `relationship`, `virtual: true`. As in data.js
38
+ * (`effectiveCeiling` L55376: "The virtual byPurpose fork adds NAMING only"), the
39
+ * ladder names ONE policy, so the account default beneath it is not consulted for posture
40
+ * (data.js L55391 skips a virtual policy) and its list does not bind as 5b (L55539). Whenever
41
+ * a rule is present the posture STARTS from the rule (L55342 — `relationshipPosture` is then
42
+ * ignored), whatever the ladder named. SCOPE under the fork is clamp 5's (L55504): the legacy
43
+ * cell chain (`legacyCeiling`), else an EDITED account default's category list (data.js
44
+ * projects it into `sharingScopeEdits[__default__]`, `projectScopeEdits` L55163-L55164), else
45
+ * the Platform default's starting scope; that default's field groups (`infoScopeItems`) bind
46
+ * too — deliberately narrower than data.js, whose 5c (L55658) drops them under the fork. When
47
+ * the rule itself blocked, the share reads data.js's sentences (L55436-L55448); when an
48
+ * attached policy blocked, the policy is named (a deliberate correction — data.js names the
49
+ * rule there). A rule for `__external__` is ignored (L55333: scope-only).
50
+ *
32
51
  * Deliberately NOT here (prototype storage artefacts or relationship-row
33
- * facts the caller holds): the `byPurpose` virtual fork, the legacy
52
+ * facts the caller holds): the legacy
34
53
  * `sharingPolicies` narrowing rows (#451 moved them onto cards), the partner
35
54
  * row's direction / team-scoped gates and item `restrictions`, deconfliction /
36
55
  * viewing / release / routing species. The legacy cell chain (`sharingScopeEdits`
@@ -238,8 +257,41 @@ export interface ShareResolveInput {
238
257
  readonly teamRowId?: string | null;
239
258
  /** Clamp 1: the purpose is switched off for the account (`isSharingPurposeDisabled` in chain.ts). Blocks reports too (flow M1). */
240
259
  readonly purposeOff?: boolean;
241
- /** The partner row's own posture, which a policy can only raise (data.js `effectiveCeiling`). Default `open`. */
260
+ /**
261
+ * The partner row's own posture, which a policy can only raise (data.js `effectiveCeiling`). Default `open`.
262
+ * IGNORED when a `partnerPurposeRule` is present: the posture then starts from the rule
263
+ * (data.js L55342: `bp.sharingPosture || over.sharingPosture || …` — the rule first).
264
+ */
242
265
  readonly relationshipPosture?: SharePosture | null;
266
+ /**
267
+ * The account's AUTHORED purpose-specific rule for this partner and purpose — data.js
268
+ * `policies.partnerOverrides[partner].byPurpose[purpose]` when it carries a `sharingPosture`
269
+ * (the Share Partners "purpose-specific rule"). When no policy is attached to the relationship
270
+ * for the purpose, the answer NAMES it as the governing policy (the virtual fork
271
+ * `pol-bp-<partner>-<purpose>`, "<purpose label> — <partner name> variant", level
272
+ * `relationship`, `virtual: true`; data.js `governingPolicyFor` L55006-L55028).
273
+ * - Posture: STARTS from `posture` whenever a rule is present, whatever the ladder named
274
+ * (L55342; `relationshipPosture` is ignored); policies and the team ceiling can only raise
275
+ * it. Under the fork the account default is not consulted for posture (L55391).
276
+ * - Scope under the fork: clamp 5 (L55504) — `legacyCeiling` (a rule's category list, if the
277
+ * caller still carries one, goes there), else an EDITED account default's list (data.js's
278
+ * projected `sharingScopeEdits[__default__]`, L55163-L55164), else the Platform default's
279
+ * starting scope; the default's list does not bind as 5b (L55539). The edited default's
280
+ * field groups (`infoScopeItems`) still bind — deliberately narrower than data.js (L55658).
281
+ * - When the rule itself blocked: "Partner is blocked for this purpose by your account's
282
+ * sharing policy" (L55447-L55448), or for a report the carve-out "Partner is blocked for
283
+ * ordinary sharing — reachable for reports" (L55436-L55446). When a policy blocked, the
284
+ * policy is named (deliberate correction: data.js names the rule even when it is open).
285
+ * Ignored inside the account and for an `__external__` recipient (L55333: scope-only); not
286
+ * named as the fork when a pair row or a relationship policy governs or for an unknown
287
+ * purpose; a `posture` that is not open / approval / blocked is no rule. `null` / absent = no
288
+ * rule (the answer is the one 0.60.0 gave).
289
+ */
290
+ readonly partnerPurposeRule?: {
291
+ readonly posture: SharePosture;
292
+ /** The partner's display name for the fork's name (the recipient id when absent). */
293
+ readonly partnerName?: string | null;
294
+ } | null;
243
295
  /**
244
296
  * The legacy cell chain for callers still carrying `sharingScopeEdits`: pass `effectiveCeiling(...)`'s
245
297
  * ANSWER (its `platform_default` rung is then ignored — the resolver reads that document itself;
@@ -277,6 +329,11 @@ export interface ShareNamedPolicy {
277
329
  readonly edited: boolean;
278
330
  readonly origin: string | null;
279
331
  readonly rulePath: string;
332
+ /**
333
+ * `true` only on the virtual `byPurpose` fork (`partnerPurposeRule`): a NAME for the authored
334
+ * purpose-specific rule, not a stored document — it binds nothing itself.
335
+ */
336
+ readonly virtual?: true;
280
337
  }
281
338
 
282
339
  export interface ShareCategoryEntry {
@@ -843,8 +900,11 @@ const copyItems = (v: unknown): Record<string, string[]> | null => {
843
900
  * THE read. See the module header; the algorithm, step by step:
844
901
  * 1. the ladder (`governingPolicyFor`): pair row → [inside: the account's
845
902
  * inside default → the platform's inside starter, stop] → relationship
846
- * (the partner id, or `__external__`) → the account default → the
847
- * Platform default (a versioned document, `pol-starter-<purpose>`);
903
+ * (the partner id, or `__external__`) → [the account's authored
904
+ * purpose-specific rule for the partner (`partnerPurposeRule`), NAMED as
905
+ * its virtual fork — posture from the rule, scope from clamp 5] → the
906
+ * account default → the Platform default (a versioned document,
907
+ * `pol-starter-<purpose>`);
848
908
  * 2. the sending team's own policy for the purpose rides as a CEILING when
849
909
  * it is not the governing one (inside the account too);
850
910
  * 3. posture: the relationship's, raised (never lowered) by the governing
@@ -956,8 +1016,41 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
956
1016
  };
957
1017
  }
958
1018
  }
1019
+ // The virtual byPurpose fork (data.js L55006-L55028): governs between the relationship
1020
+ // rung and the account default.
1021
+ let fork: Hit | null = null;
959
1022
  if (gov === null && !inside && purposeKnown && recipientKey !== null) {
960
1023
  gov = hit(cell(att.relationships, recipientKey), "relationship");
1024
+ const rule = input.partnerPurposeRule;
1025
+ const rulePosture = rule?.posture;
1026
+ if (
1027
+ gov === null &&
1028
+ recipient.kind === "partner" && // `__external__` stays scope-only (data.js L55333)
1029
+ (rulePosture === "open" ||
1030
+ rulePosture === "approval" ||
1031
+ rulePosture === "blocked")
1032
+ ) {
1033
+ const partnerName =
1034
+ typeof rule?.partnerName === "string" && rule.partnerName !== ""
1035
+ ? rule.partnerName
1036
+ : recipientKey;
1037
+ fork = {
1038
+ policy: {
1039
+ id: `pol-bp-${recipientKey}-${purpose}`,
1040
+ name: `${purposeLabel} — ${partnerName} variant`,
1041
+ purpose,
1042
+ posture: rulePosture,
1043
+ infoScope: null,
1044
+ cadences: null,
1045
+ version: 1,
1046
+ origin: { kind: "fork" },
1047
+ edited: true,
1048
+ },
1049
+ level: "relationship",
1050
+ version: 1,
1051
+ rulePath: `policies.partnerOverrides[${recipientKey}].byPurpose[${purpose}] (purpose-specific rule, reported as its fork)`,
1052
+ };
1053
+ }
961
1054
  if (gov === null)
962
1055
  gov = hit(own<string>(att.agencyDefaults, purpose), "agency_default");
963
1056
  if (gov === null && pd !== null) {
@@ -979,14 +1072,62 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
979
1072
  };
980
1073
  }
981
1074
  }
1075
+ // Under the fork the account default is not consulted for posture or as 5b; an EDITED
1076
+ // account default's list still binds scope as clamp 5's ceiling, as data.js's projection
1077
+ // `sharingScopeEdits[__default__]` (projectScopeEdits L55163-L55164; read L55501, L55504).
1078
+ // Its FIELD GROUPS (`infoScopeItems`) bind too — DELIBERATELY NARROWER than data.js, whose 5c
1079
+ // (L55658) reads only the governing policy and so drops them under the fork while it keeps
1080
+ // the same default's category list: a posture-only partner rule must not release field
1081
+ // groups the admin withheld (pending the owner's word). Likewise its category list binds even
1082
+ // when `legacyCeiling` is passed (data.js would read the legacy partner rule INSTEAD of it,
1083
+ // L55504) — the 0.60.0 answer bound both, and a posture-only rule must not widen scope.
1084
+ let defaultProjection: string[] | null = null;
1085
+ let defaultItems: {
1086
+ readonly rows: Record<string, string[]>;
1087
+ readonly name: string;
1088
+ } | null = null;
1089
+ if (fork !== null) {
1090
+ if (
1091
+ gov !== null &&
1092
+ gov.level === "agency_default" &&
1093
+ gov.policy.edited === true
1094
+ ) {
1095
+ if (isStringList(gov.policy.infoScope))
1096
+ defaultProjection = [...gov.policy.infoScope];
1097
+ const items = copyItems(gov.policy.infoScopeItems);
1098
+ if (items !== null)
1099
+ defaultItems = {
1100
+ rows: items,
1101
+ name:
1102
+ typeof gov.policy.name === "string" ? gov.policy.name : gov.policy.id,
1103
+ };
1104
+ }
1105
+ gov = fork;
1106
+ }
1107
+ // data.js `postureByPurpose` (L55343): an authored purpose-specific rule for this partner
1108
+ // and purpose. Its posture is where the posture STARTS whatever the ladder named (L55342:
1109
+ // `bp.sharingPosture || over.sharingPosture || …` — the rule first). `__external__` stays
1110
+ // scope-only (L55333): a rule passed for it is ignored.
1111
+ const rulePosture = input.partnerPurposeRule?.posture;
1112
+ const ruleAuthored =
1113
+ !inside &&
1114
+ recipient.kind === "partner" &&
1115
+ (rulePosture === "open" ||
1116
+ rulePosture === "approval" ||
1117
+ rulePosture === "blocked");
982
1118
 
983
- // 2. the team ceiling
1119
+ // 2. the team ceiling (data.js `done()` composes it over every rung's answer, the fork's too)
984
1120
  let tc: Hit | null = null;
985
1121
  if (teamId !== null && gov !== null) {
986
1122
  const t = hit(cell(att.teams, teamId), "team");
987
1123
  if (t !== null && t.policy.id !== gov.policy.id) tc = t;
988
1124
  }
989
- const govNamed = gov === null ? null : named(gov);
1125
+ const govNamed: ShareNamedPolicy | null =
1126
+ gov === null
1127
+ ? null
1128
+ : fork !== null
1129
+ ? { ...named(gov), virtual: true }
1130
+ : named(gov);
990
1131
  const tcNamed = tc === null ? null : named(tc);
991
1132
  const rulePath =
992
1133
  gov === null
@@ -995,15 +1136,19 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
995
1136
  ? gov.rulePath
996
1137
  : `${gov.rulePath} ∩ ${tc.rulePath} (the sending team's own policy is a ceiling — only what both allow)`;
997
1138
 
998
- // 3. posture
1139
+ // 3. posture — the rule's when one is present (`relationshipPosture` is then ignored), else
1140
+ // the relationship row's
999
1141
  let posture: SharePosture =
1000
- input.relationshipPosture === "approval" ||
1001
- input.relationshipPosture === "blocked"
1002
- ? input.relationshipPosture
1003
- : "open";
1142
+ ruleAuthored && rulePosture !== undefined
1143
+ ? rulePosture
1144
+ : input.relationshipPosture === "approval" ||
1145
+ input.relationshipPosture === "blocked"
1146
+ ? input.relationshipPosture
1147
+ : "open";
1004
1148
  let postureSource: ShareResolution["postureSource"] = "relationship";
1005
1149
  let posturePol: ShareNamedPolicy | null = null;
1006
1150
  if (
1151
+ fork === null && // data.js L55391: a virtual policy's posture is never applied
1007
1152
  govNamed?.posture &&
1008
1153
  SHARE_POSTURE_RANK[govNamed.posture] > SHARE_POSTURE_RANK[posture]
1009
1154
  ) {
@@ -1039,7 +1184,19 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
1039
1184
  pol === null
1040
1185
  ? "relationship posture = blocked"
1041
1186
  : `sharingPurposePolicies[${pol.id}].posture=blocked (policy “${pol.name}” — ${pol.levelLabel})`;
1042
- if (report) {
1187
+ // The rule itself is what blocked (data.js `!byCeiling && postureByPurpose`, L55436 /
1188
+ // L55447). DELIBERATE CORRECTION of data.js: there the purpose-rule sentence and path also
1189
+ // stand when the rule is open and an attached policy blocked, naming a cause that is false;
1190
+ // here they stand only when the rule blocked — the decision is unchanged, the audit record
1191
+ // names the true cause.
1192
+ const byRule = ruleAuthored && postureSource === "relationship";
1193
+ if (report && byRule) {
1194
+ // data.js L55436-L55446
1195
+ reportCarveOut = {
1196
+ note: "Partner is blocked for ordinary sharing — reachable for reports",
1197
+ rulePath: `reports-never-blocked-at-partner-layer (Crysta ruling 2026-08-23; policies.partnerOverrides[${recipientKey}].byPurpose[${purpose}].sharingPosture=blocked does not bind a legal duty — who may send is a role/function question)`,
1198
+ };
1199
+ } else if (report) {
1043
1200
  reportCarveOut = {
1044
1201
  note:
1045
1202
  pol === null
@@ -1047,6 +1204,13 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
1047
1204
  : `The “${pol.name}” policy blocks ordinary sharing — reachable for reports`,
1048
1205
  rulePath: path,
1049
1206
  };
1207
+ } else if (byRule) {
1208
+ // data.js L55447-L55448
1209
+ excluded = {
1210
+ reason:
1211
+ "Partner is blocked for this purpose by your account's sharing policy",
1212
+ rulePath: `policies.partnerOverrides[${recipientKey}].byPurpose[${purpose}].sharingPosture=blocked (Share Partners — purpose-specific rule)`,
1213
+ };
1050
1214
  } else {
1051
1215
  excluded = {
1052
1216
  reason:
@@ -1071,12 +1235,18 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
1071
1235
  level === "inside_starter" ||
1072
1236
  (level === "agency_default" && gov.policy.edited === true));
1073
1237
  const legacy = legacyCeilingList(input.legacyCeiling);
1074
- const ceilingIsStarter = legacy === null;
1075
- let groupCeiling: string[] | null = legacy ?? pdRaw;
1238
+ // data.js L55504-L55505: cpEdit || seedOverride || defEdit || the starting scope
1239
+ const projectionPath = `policies.sharingScopeEdits[__default__][${purpose}] (projected from your account default policy)`;
1240
+ const projOverLegacy: string[] | null =
1241
+ legacy !== null ? defaultProjection : null;
1242
+ const ceilingIsStarter = legacy === null && defaultProjection === null;
1243
+ let groupCeiling: string[] | null = legacy ?? defaultProjection ?? pdRaw;
1076
1244
  let ceilingPath =
1077
1245
  legacy !== null
1078
1246
  ? "sharingScopeEdits (the account's partner / default rule — the legacy cell chain)"
1079
- : pd === null
1247
+ : defaultProjection !== null
1248
+ ? projectionPath
1249
+ : pd === null
1080
1250
  ? "no Platform default"
1081
1251
  : `pol-starter-${purpose} v${pd.version} (Platform default — the starting scope for this purpose)`;
1082
1252
  if (ceilingIsStarter && polScopeBinds) {
@@ -1230,6 +1400,28 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
1230
1400
  `Outside what the “${govName}” policy allows for this purpose`,
1231
1401
  );
1232
1402
  }
1403
+ // Under the fork with `legacyCeiling` passed: the edited account default's list binds too.
1404
+ if (
1405
+ allowed &&
1406
+ !req &&
1407
+ projOverLegacy !== null &&
1408
+ !scopeListCovers(scope, projOverLegacy, g)
1409
+ ) {
1410
+ allowed = false;
1411
+ reason = "Outside the payload for this purpose";
1412
+ path = projectionPath;
1413
+ }
1414
+ if (
1415
+ allowed &&
1416
+ !req &&
1417
+ projOverLegacy !== null &&
1418
+ !scopeListStrictlyCovers(scope, projOverLegacy, g)
1419
+ ) {
1420
+ addExcluded(
1421
+ outside((r) => scopeListCovers(scope, projOverLegacy, g, r)),
1422
+ "Outside the payload for this purpose",
1423
+ );
1424
+ }
1233
1425
  const govRows = polScopeBinds ? own<unknown>(govItems, g) : undefined;
1234
1426
  if (allowed && !req && isStringList(govRows)) {
1235
1427
  const keep = new Set(govRows);
@@ -1240,6 +1432,18 @@ export function resolveShare(input: ShareResolveInput): ShareResolution {
1240
1432
  `Outside what the “${govName}” policy allows for this purpose`,
1241
1433
  );
1242
1434
  }
1435
+ // Under the fork: the edited account default's field groups still bind (see above).
1436
+ const defRows =
1437
+ defaultItems === null ? undefined : own<unknown>(defaultItems.rows, g);
1438
+ if (allowed && !req && isStringList(defRows)) {
1439
+ const keep = new Set(defRows);
1440
+ const kept = (r: string): boolean =>
1441
+ keep.has(r) || scope.ancestorsOf(r).some((a) => a !== g && keep.has(a));
1442
+ addExcluded(
1443
+ outside(kept),
1444
+ `Outside what the “${defaultItems?.name ?? ""}” policy allows for this purpose`,
1445
+ );
1446
+ }
1243
1447
  if (
1244
1448
  allowed &&
1245
1449
  !req &&
@@ -233,18 +233,18 @@ type SectionQuestionRef = InferRawDocType<typeof sectionQuestionRefSchema>;
233
233
  declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
234
234
  _id: false;
235
235
  }, {
236
- text: string;
237
236
  type: "tip" | "warning" | "prompt";
238
- }, mongoose.Document<unknown, {}, {
239
237
  text: string;
238
+ }, mongoose.Document<unknown, {}, {
240
239
  type: "tip" | "warning" | "prompt";
240
+ text: string;
241
241
  }, {
242
242
  id: string;
243
243
  }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
244
244
  _id: false;
245
245
  }>> & Omit<{
246
- text: string;
247
246
  type: "tip" | "warning" | "prompt";
247
+ text: string;
248
248
  } & {
249
249
  _id: mongoose.Types.ObjectId;
250
250
  } & {
@@ -252,8 +252,8 @@ declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any
252
252
  }, "id"> & {
253
253
  id: string;
254
254
  }, unknown, {
255
- text: string;
256
255
  type: "tip" | "warning" | "prompt";
256
+ text: string;
257
257
  } & {
258
258
  _id: mongoose.Types.ObjectId;
259
259
  } & {
@@ -294,18 +294,18 @@ declare const sectionSchemaDefinition: {
294
294
  type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
295
295
  _id: false;
296
296
  }, {
297
- text: string;
298
297
  type: "tip" | "warning" | "prompt";
299
- }, mongoose.Document<unknown, {}, {
300
298
  text: string;
299
+ }, mongoose.Document<unknown, {}, {
301
300
  type: "tip" | "warning" | "prompt";
301
+ text: string;
302
302
  }, {
303
303
  id: string;
304
304
  }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
305
305
  _id: false;
306
306
  }>> & Omit<{
307
- text: string;
308
307
  type: "tip" | "warning" | "prompt";
308
+ text: string;
309
309
  } & {
310
310
  _id: mongoose.Types.ObjectId;
311
311
  } & {
@@ -313,8 +313,8 @@ declare const sectionSchemaDefinition: {
313
313
  }, "id"> & {
314
314
  id: string;
315
315
  }, unknown, {
316
- text: string;
317
316
  type: "tip" | "warning" | "prompt";
317
+ text: string;
318
318
  } & {
319
319
  _id: mongoose.Types.ObjectId;
320
320
  } & {
@@ -233,18 +233,18 @@ type SectionQuestionRef = InferRawDocType<typeof sectionQuestionRefSchema>;
233
233
  declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
234
234
  _id: false;
235
235
  }, {
236
- text: string;
237
236
  type: "tip" | "warning" | "prompt";
238
- }, mongoose.Document<unknown, {}, {
239
237
  text: string;
238
+ }, mongoose.Document<unknown, {}, {
240
239
  type: "tip" | "warning" | "prompt";
240
+ text: string;
241
241
  }, {
242
242
  id: string;
243
243
  }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
244
244
  _id: false;
245
245
  }>> & Omit<{
246
- text: string;
247
246
  type: "tip" | "warning" | "prompt";
247
+ text: string;
248
248
  } & {
249
249
  _id: mongoose.Types.ObjectId;
250
250
  } & {
@@ -252,8 +252,8 @@ declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any
252
252
  }, "id"> & {
253
253
  id: string;
254
254
  }, unknown, {
255
- text: string;
256
255
  type: "tip" | "warning" | "prompt";
256
+ text: string;
257
257
  } & {
258
258
  _id: mongoose.Types.ObjectId;
259
259
  } & {
@@ -294,18 +294,18 @@ declare const sectionSchemaDefinition: {
294
294
  type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
295
295
  _id: false;
296
296
  }, {
297
- text: string;
298
297
  type: "tip" | "warning" | "prompt";
299
- }, mongoose.Document<unknown, {}, {
300
298
  text: string;
299
+ }, mongoose.Document<unknown, {}, {
301
300
  type: "tip" | "warning" | "prompt";
301
+ text: string;
302
302
  }, {
303
303
  id: string;
304
304
  }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
305
305
  _id: false;
306
306
  }>> & Omit<{
307
- text: string;
308
307
  type: "tip" | "warning" | "prompt";
308
+ text: string;
309
309
  } & {
310
310
  _id: mongoose.Types.ObjectId;
311
311
  } & {
@@ -313,8 +313,8 @@ declare const sectionSchemaDefinition: {
313
313
  }, "id"> & {
314
314
  id: string;
315
315
  }, unknown, {
316
- text: string;
317
316
  type: "tip" | "warning" | "prompt";
317
+ text: string;
318
318
  } & {
319
319
  _id: mongoose.Types.ObjectId;
320
320
  } & {