@htilabs/platform-common-models 0.17.0 → 0.18.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 (71) hide show
  1. package/dist/agency-BHv54o79.d.ts +484 -0
  2. package/dist/agency-Ca4pCOOf.d.ts +342 -0
  3. package/dist/agency-DYCv839V.d.cts +342 -0
  4. package/dist/agency-Djp57S71.d.cts +484 -0
  5. package/dist/constants/index.cjs +952 -0
  6. package/dist/constants/index.cjs.map +1 -1
  7. package/dist/constants/index.d.cts +3 -1
  8. package/dist/constants/index.d.ts +3 -1
  9. package/dist/constants/index.js +920 -0
  10. package/dist/constants/index.js.map +1 -1
  11. package/dist/{cvcEntry-ctHTp2df.d.cts → cvcEntry-0BIB9sen.d.cts} +36 -36
  12. package/dist/{cvcEntry-ctHTp2df.d.ts → cvcEntry-0BIB9sen.d.ts} +36 -36
  13. package/dist/cvcs/index.cjs +114 -62
  14. package/dist/cvcs/index.cjs.map +1 -1
  15. package/dist/cvcs/index.d.cts +112 -59
  16. package/dist/cvcs/index.d.ts +112 -59
  17. package/dist/cvcs/index.js +114 -62
  18. package/dist/cvcs/index.js.map +1 -1
  19. package/dist/enums/index.cjs +1 -0
  20. package/dist/enums/index.cjs.map +1 -1
  21. package/dist/enums/index.d.cts +2 -1
  22. package/dist/enums/index.d.ts +2 -1
  23. package/dist/enums/index.js +1 -0
  24. package/dist/enums/index.js.map +1 -1
  25. package/dist/{index-4DiJrn7y.d.ts → index-CDoqrfc1.d.ts} +1 -1
  26. package/dist/{index-qreOzXYS.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  27. package/dist/index.cjs +1654 -1077
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +6 -4
  30. package/dist/index.d.ts +6 -4
  31. package/dist/index.js +1600 -1076
  32. package/dist/index.js.map +1 -1
  33. package/dist/models/index.d.cts +2 -2
  34. package/dist/models/index.d.ts +2 -2
  35. package/dist/org-type-BYQb9Qzq.d.ts +366 -0
  36. package/dist/org-type-D_FG4KdN.d.cts +366 -0
  37. package/dist/{platform-auth-CrF5U_JH.d.cts → platform-auth-CvAYFVhK.d.cts} +39 -0
  38. package/dist/{platform-auth-CrF5U_JH.d.ts → platform-auth-CvAYFVhK.d.ts} +39 -0
  39. package/dist/schemas/index.cjs +977 -2
  40. package/dist/schemas/index.cjs.map +1 -1
  41. package/dist/schemas/index.d.cts +14 -11
  42. package/dist/schemas/index.d.ts +14 -11
  43. package/dist/schemas/index.js +962 -1
  44. package/dist/schemas/index.js.map +1 -1
  45. package/dist/types/index.d.cts +2 -2
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/validation/index.cjs +894 -2
  48. package/dist/validation/index.cjs.map +1 -1
  49. package/dist/validation/index.d.cts +5 -1
  50. package/dist/validation/index.d.ts +5 -1
  51. package/dist/validation/index.js +884 -1
  52. package/dist/validation/index.js.map +1 -1
  53. package/package.json +26 -27
  54. package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
  55. package/src/__tests__/cvc-sot-snapshot.test.ts +5 -5
  56. package/src/__tests__/cvc-structural.test.ts +1 -1
  57. package/src/__tests__/org-type-contract.test.ts +1353 -0
  58. package/src/__tests__/referral-entity-category-canon.test.ts +255 -81
  59. package/src/constants/ic.ts +45 -0
  60. package/src/constants/index.ts +1 -0
  61. package/src/constants/org-type.ts +703 -0
  62. package/src/cvcs/index.ts +1 -1
  63. package/src/cvcs/{referralEntityCategory.v1.1.0.json → referralEntityCategory.v1.2.0.json} +111 -59
  64. package/src/generated/cvc-enums.ts +2 -1
  65. package/src/index.ts +23 -0
  66. package/src/schemas/agency.ts +481 -0
  67. package/src/schemas/index.ts +24 -0
  68. package/src/validation/agency.ts +119 -0
  69. package/src/validation/index.ts +1 -0
  70. package/dist/team-C4LJ5Tex.d.cts +0 -333
  71. package/dist/team-C4LJ5Tex.d.ts +0 -333
@@ -0,0 +1,484 @@
1
+ import { z } from 'zod';
2
+ import { a as AgencyTypeKey, k as OrgTypeSelectableKey } from './org-type-BYQb9Qzq.js';
3
+
4
+ /**
5
+ * @htilabs/platform-common-models — Controlled Vocabulary (CVC) Validation
6
+ *
7
+ * Zod schemas for validating CVC Source-of-Truth (SOT) JSON files and
8
+ * individual CVC entries. Implements the locked spec §9.2 shapes.
9
+ *
10
+ * Used by:
11
+ * - CI structural tests that parse every committed SOT file.
12
+ * - The generalized seed CLI (`seedCvc`) prior to persistence.
13
+ * - Downstream consumers that need to validate CVC payloads.
14
+ *
15
+ * Canonical spec:
16
+ * /gt/docs/data/cvcs/CVC Implementation Spec 2780449faf8045258c67daab0f1c5569.md
17
+ *
18
+ * Format v2 (2026-04-15):
19
+ * - Positional 7-segment codes `XXX-XXX-XXX-XXX-XXX-XXX-XXX` (3 digits per
20
+ * segment). Segment 1 is the Notion-aligned domain prefix:
21
+ * `022` service_categories (CVC-22)
22
+ * `025` service_mechanisms (CVC-25)
23
+ * `049` service_states (CVC-49)
24
+ * - Missingness entries are embedded per-domain (synthetic `missingness_root`
25
+ * at `<prefix>-000-000-000-000-000-000` plus three values at segment 7 =
26
+ * `001`/`002`/`003`). The shared `missingness.v1.0.0.json` file was
27
+ * retired in favor of per-domain missingness.
28
+ * - Envelope `missingness` field and the C7 invariant have been removed; the
29
+ * shared-merge pathway no longer exists.
30
+ */
31
+
32
+ /**
33
+ * 7-segment positional CVC code: `XXX-XXX-XXX-XXX-XXX-XXX-XXX` (three digits
34
+ * per segment). Segment 1 is the Notion-aligned domain prefix. Remaining
35
+ * hierarchy segments are filled left-to-right as levels deepen; unused
36
+ * segments remain `000`. See locked spec §3 (format v2).
37
+ */
38
+ declare const CvcCodeSchema: z.ZodString;
39
+ /**
40
+ * Stable machine key for a CVC entry. Must start with a lowercase letter and
41
+ * contain only lowercase alphanumerics or underscores. Used as a cross-CVC
42
+ * reference target (e.g. `relevantMechanisms` pointing at mechanism keys).
43
+ * See locked spec §3.2.
44
+ */
45
+ declare const CvcKeySchema: z.ZodString;
46
+ /**
47
+ * Base entry shape shared by every CVC domain. Domain-specific extensions
48
+ * (e.g. `ServiceCategoryEntrySchema`) should use `.extend()` to add fields.
49
+ * See locked spec §9.2.
50
+ *
51
+ * Uses `.passthrough()` so that domain-specific fields (like
52
+ * `relevantMechanisms` on service-category entries) survive base parsing
53
+ * unmodified. This keeps cross-CVC reference validation honest: the §4.5
54
+ * structural validator needs to see the raw referenced keys, and a strip-by-
55
+ * default schema would silently hide them.
56
+ */
57
+ declare const CvcEntrySchema: z.ZodObject<{
58
+ code: z.ZodString;
59
+ key: z.ZodString;
60
+ title: z.ZodString;
61
+ selectable: z.ZodBoolean;
62
+ parentCode: z.ZodNullable<z.ZodString>;
63
+ childCodes: z.ZodArray<z.ZodString, "many">;
64
+ definition: z.ZodNullable<z.ZodString>;
65
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
66
+ code: z.ZodString;
67
+ key: z.ZodString;
68
+ title: z.ZodString;
69
+ selectable: z.ZodBoolean;
70
+ parentCode: z.ZodNullable<z.ZodString>;
71
+ childCodes: z.ZodArray<z.ZodString, "many">;
72
+ definition: z.ZodNullable<z.ZodString>;
73
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
74
+ code: z.ZodString;
75
+ key: z.ZodString;
76
+ title: z.ZodString;
77
+ selectable: z.ZodBoolean;
78
+ parentCode: z.ZodNullable<z.ZodString>;
79
+ childCodes: z.ZodArray<z.ZodString, "many">;
80
+ definition: z.ZodNullable<z.ZodString>;
81
+ }, z.ZodTypeAny, "passthrough">>;
82
+ /**
83
+ * Service-category-specific entry. Adds `relevantMechanisms` — a cross-CVC
84
+ * reference into the `service_mechanisms` domain via entry keys. `null` means
85
+ * "not applicable" (e.g. structural L1 topic rows). See locked spec §9.2.
86
+ */
87
+ declare const ServiceCategoryEntrySchema: z.ZodObject<{
88
+ code: z.ZodString;
89
+ key: z.ZodString;
90
+ title: z.ZodString;
91
+ selectable: z.ZodBoolean;
92
+ parentCode: z.ZodNullable<z.ZodString>;
93
+ childCodes: z.ZodArray<z.ZodString, "many">;
94
+ definition: z.ZodNullable<z.ZodString>;
95
+ } & {
96
+ relevantMechanisms: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
97
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
98
+ code: z.ZodString;
99
+ key: z.ZodString;
100
+ title: z.ZodString;
101
+ selectable: z.ZodBoolean;
102
+ parentCode: z.ZodNullable<z.ZodString>;
103
+ childCodes: z.ZodArray<z.ZodString, "many">;
104
+ definition: z.ZodNullable<z.ZodString>;
105
+ } & {
106
+ relevantMechanisms: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
107
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
108
+ code: z.ZodString;
109
+ key: z.ZodString;
110
+ title: z.ZodString;
111
+ selectable: z.ZodBoolean;
112
+ parentCode: z.ZodNullable<z.ZodString>;
113
+ childCodes: z.ZodArray<z.ZodString, "many">;
114
+ definition: z.ZodNullable<z.ZodString>;
115
+ } & {
116
+ relevantMechanisms: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
117
+ }, z.ZodTypeAny, "passthrough">>;
118
+ /**
119
+ * Primary-language-specific entry. Adds:
120
+ * - `iso6391Code` — the ISO 639-1 alpha-2 code for the language, or `null`
121
+ * for entries without an ISO 639-1 code (missingness entries, Chinese
122
+ * varieties Mandarin/Cantonese, `other_language`). ASL is stored as
123
+ * `"ase"` (ISO 639-3) per Notion's convention; the CVC header documents
124
+ * this caveat.
125
+ * - `priority` — `true` for front-end short-list entries (14 total in
126
+ * CVC-122: 13 L1 languages plus the canonical `unknown` missingness
127
+ * entry). See locked spec §9.2.
128
+ */
129
+ declare const PrimaryLanguageEntrySchema: z.ZodObject<{
130
+ code: z.ZodString;
131
+ key: z.ZodString;
132
+ title: z.ZodString;
133
+ selectable: z.ZodBoolean;
134
+ parentCode: z.ZodNullable<z.ZodString>;
135
+ childCodes: z.ZodArray<z.ZodString, "many">;
136
+ definition: z.ZodNullable<z.ZodString>;
137
+ } & {
138
+ iso6391Code: z.ZodNullable<z.ZodString>;
139
+ priority: z.ZodBoolean;
140
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
141
+ code: z.ZodString;
142
+ key: z.ZodString;
143
+ title: z.ZodString;
144
+ selectable: z.ZodBoolean;
145
+ parentCode: z.ZodNullable<z.ZodString>;
146
+ childCodes: z.ZodArray<z.ZodString, "many">;
147
+ definition: z.ZodNullable<z.ZodString>;
148
+ } & {
149
+ iso6391Code: z.ZodNullable<z.ZodString>;
150
+ priority: z.ZodBoolean;
151
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
152
+ code: z.ZodString;
153
+ key: z.ZodString;
154
+ title: z.ZodString;
155
+ selectable: z.ZodBoolean;
156
+ parentCode: z.ZodNullable<z.ZodString>;
157
+ childCodes: z.ZodArray<z.ZodString, "many">;
158
+ definition: z.ZodNullable<z.ZodString>;
159
+ } & {
160
+ iso6391Code: z.ZodNullable<z.ZodString>;
161
+ priority: z.ZodBoolean;
162
+ }, z.ZodTypeAny, "passthrough">>;
163
+ /**
164
+ * Top-level SOT JSON envelope. One envelope per (domain, version) pair.
165
+ *
166
+ * `levels` is a positional map from level number (`"0"`, `"1"`, …) to a human
167
+ * label describing the level. Missingness entries are embedded in `entries`
168
+ * (per-domain) rather than merged in from a shared SOT file; see module
169
+ * header for the v2 format summary.
170
+ */
171
+ declare const CvcEnvelopeSchema: z.ZodObject<{
172
+ domain: z.ZodString;
173
+ name: z.ZodString;
174
+ version: z.ZodString;
175
+ levels: z.ZodRecord<z.ZodString, z.ZodString>;
176
+ entries: z.ZodArray<z.ZodObject<{
177
+ code: z.ZodString;
178
+ key: z.ZodString;
179
+ title: z.ZodString;
180
+ selectable: z.ZodBoolean;
181
+ parentCode: z.ZodNullable<z.ZodString>;
182
+ childCodes: z.ZodArray<z.ZodString, "many">;
183
+ definition: z.ZodNullable<z.ZodString>;
184
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
185
+ code: z.ZodString;
186
+ key: z.ZodString;
187
+ title: z.ZodString;
188
+ selectable: z.ZodBoolean;
189
+ parentCode: z.ZodNullable<z.ZodString>;
190
+ childCodes: z.ZodArray<z.ZodString, "many">;
191
+ definition: z.ZodNullable<z.ZodString>;
192
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
193
+ code: z.ZodString;
194
+ key: z.ZodString;
195
+ title: z.ZodString;
196
+ selectable: z.ZodBoolean;
197
+ parentCode: z.ZodNullable<z.ZodString>;
198
+ childCodes: z.ZodArray<z.ZodString, "many">;
199
+ definition: z.ZodNullable<z.ZodString>;
200
+ }, z.ZodTypeAny, "passthrough">>, "many">;
201
+ }, "strip", z.ZodTypeAny, {
202
+ name: string;
203
+ version: string;
204
+ entries: z.objectOutputType<{
205
+ code: z.ZodString;
206
+ key: z.ZodString;
207
+ title: z.ZodString;
208
+ selectable: z.ZodBoolean;
209
+ parentCode: z.ZodNullable<z.ZodString>;
210
+ childCodes: z.ZodArray<z.ZodString, "many">;
211
+ definition: z.ZodNullable<z.ZodString>;
212
+ }, z.ZodTypeAny, "passthrough">[];
213
+ domain: string;
214
+ levels: Record<string, string>;
215
+ }, {
216
+ name: string;
217
+ version: string;
218
+ entries: z.objectInputType<{
219
+ code: z.ZodString;
220
+ key: z.ZodString;
221
+ title: z.ZodString;
222
+ selectable: z.ZodBoolean;
223
+ parentCode: z.ZodNullable<z.ZodString>;
224
+ childCodes: z.ZodArray<z.ZodString, "many">;
225
+ definition: z.ZodNullable<z.ZodString>;
226
+ }, z.ZodTypeAny, "passthrough">[];
227
+ domain: string;
228
+ levels: Record<string, string>;
229
+ }>;
230
+ type CvcCode = z.infer<typeof CvcCodeSchema>;
231
+ type CvcKey = z.infer<typeof CvcKeySchema>;
232
+ type CvcEntry = z.infer<typeof CvcEntrySchema>;
233
+ type ServiceCategoryEntry = z.infer<typeof ServiceCategoryEntrySchema>;
234
+ type PrimaryLanguageEntry = z.infer<typeof PrimaryLanguageEntrySchema>;
235
+ type CvcEnvelope = z.infer<typeof CvcEnvelopeSchema>;
236
+ /**
237
+ * SOT family identifier (e.g. `"service_categories"`, `"service_states"`,
238
+ * `"service_mechanisms"`, `"missingness"`). The canonical list of domains is
239
+ * enumerated by the SOT JSON files in `src/cvcs/`. Typed as `string` rather
240
+ * than a closed union so adding a new SOT file does not require touching this
241
+ * type. See locked spec §2.
242
+ */
243
+ type CvcDomain = string;
244
+ /**
245
+ * Derive an entry's level from its 7-segment code per locked spec §3.3.
246
+ *
247
+ * - Segment 7 non-zero → level 0 (missingness value entry, e.g. `unknown`).
248
+ * - Otherwise return the index (1..5) of the last non-zero hierarchy segment.
249
+ * - Hierarchy segments 2..7 all zero → level 0 (per-domain missingness root,
250
+ * e.g. `022-000-000-000-000-000-000`). Segment 1 carries the domain prefix
251
+ * and is intentionally not consulted by the level derivation.
252
+ */
253
+ declare function getCvcLevel(code: string): number;
254
+ /**
255
+ * Error collected by {@link validateCvc}. Each error names the invariant it
256
+ * violates (`C1`..`C8`, skipping the retired `C7`) so CI output points
257
+ * straight at the locked spec rule that failed. `code` or `key` narrow the
258
+ * error to a specific entry when the violation is entry-scoped.
259
+ */
260
+ interface CvcValidationError {
261
+ invariant: "C1" | "C2" | "C3" | "C4" | "C5" | "C6" | "C8";
262
+ message: string;
263
+ code?: string;
264
+ key?: string;
265
+ }
266
+ /**
267
+ * Structural invariants to enforce on every committed SOT file per locked spec
268
+ * §4. Zod's schema `parse()` guarantees the *shape* of the envelope; this
269
+ * function enforces the cross-entry *semantics* that Zod cannot express.
270
+ *
271
+ * Invariants (locked spec §4):
272
+ * - **C1** Code format + uniqueness (§4.1). Format v2 uses 3-digit segments.
273
+ * - **C2** Key format + uniqueness (§4.2).
274
+ * - **C3** Tree: every `parentCode` resolves to an existing entry or null; no
275
+ * cycles (§4.3).
276
+ * - **C4** `childCodes` are the exact bidirectional inverse of `parentCode`
277
+ * (§4.3).
278
+ * - **C5** Selectability is a boolean (§4.4).
279
+ * - **C6** Cross-CVC `relevantMechanisms` references resolve against a
280
+ * provided `service_mechanisms` key set (§4.5, §7). Only checked when the
281
+ * caller supplies `options.mechanismKeys`.
282
+ * - **C7** _Retired in format v2_ (envelope no longer carries the shared
283
+ * `missingness` field; missingness is per-domain and embedded in
284
+ * `entries`). The invariant slot is intentionally left empty to preserve
285
+ * the numbering of C1/C2/C3/C4/C5/C6/C8 in historical references.
286
+ * - **C8** No entry anywhere contains a key `'provided'` (legacy Thread UI
287
+ * label guard; not a canonical state).
288
+ *
289
+ * @param envelope Parsed envelope (typically from `CvcEnvelopeSchema.parse()`).
290
+ * @param options.mechanismKeys Optional set of valid `service_mechanisms`
291
+ * entry keys. If provided and the envelope entries have `relevantMechanisms`
292
+ * fields, each referenced key must be in this set (C6).
293
+ * @returns An array of {@link CvcValidationError}. An empty array means valid.
294
+ */
295
+ declare function validateCvc(envelope: CvcEnvelope, options?: {
296
+ mechanismKeys?: ReadonlySet<string>;
297
+ }): CvcValidationError[];
298
+
299
+ /**
300
+ * @htilabs/platform-common-models — Team directory field validation
301
+ *
302
+ * Zod schemas for the team directory fields declared in
303
+ * `../schemas/team.ts`, the fields the Thread→PAVE "Refer to intake" preset
304
+ * reads. See that module for canon citations and the two deliberate
305
+ * divergences (`apps` uses the {@link PLATFORM_TOOL} codes, and `canReferTo`
306
+ * sits on the team because there is no Program model).
307
+ *
308
+ * This is the wire / API shape: ids are 24-hex strings, not ObjectIds. Merge
309
+ * {@link TeamDirectoryFieldsSchema} into a consumer's team schema with
310
+ * `.merge()` or `.extend(TeamDirectoryFieldsSchema.shape)`.
311
+ */
312
+
313
+ /** One platform app a team works in: a {@link PLATFORM_TOOL} code. */
314
+ declare const TeamAppSchema: z.ZodEnum<["PAVE", "ECHO", "LEADS", "THREAD", "TRAIL", "PLATFORM"]>;
315
+ /**
316
+ * The team directory fields. Both are optional, so a team payload without
317
+ * them validates unchanged. When present, neither list may repeat a value.
318
+ */
319
+ declare const TeamDirectoryFieldsSchema: z.ZodObject<{
320
+ apps: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["PAVE", "ECHO", "LEADS", "THREAD", "TRAIL", "PLATFORM"]>, "many">, ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[], ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[]>>;
321
+ canReferTo: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ apps?: ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[] | undefined;
324
+ canReferTo?: string[] | undefined;
325
+ }, {
326
+ apps?: ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[] | undefined;
327
+ canReferTo?: string[] | undefined;
328
+ }>;
329
+ /** A platform app code accepted on a team. */
330
+ type TeamApp = z.infer<typeof TeamAppSchema>;
331
+ /** Wire shape of the team directory fields (ids as hex strings). */
332
+ type TeamDirectoryFieldsInput = z.infer<typeof TeamDirectoryFieldsSchema>;
333
+
334
+ /**
335
+ * @htilabs/platform-common-models — Agency organization-type field validation
336
+ *
337
+ * Zod schemas for the organization-type fields declared in
338
+ * `../schemas/agency.ts`. These are WRITE shapes — what an Admin Hub
339
+ * "Organization Type" write, a provisioning payload or a backfill row may
340
+ * carry. They are deliberately strict: a legacy free-text `type` or a
341
+ * `null` does not parse. Do not validate a pre-backfill `/me` or directory
342
+ * READ with them; until the backfill lands, a read may still carry free text
343
+ * (resolve it with `resolveAgencyTypeKey`, which answers `null` for it).
344
+ * See `../schemas/agency.ts` and `../constants/org-type.ts` for the ruling
345
+ * and the vocabulary.
346
+ *
347
+ * Merge the fields into a consumer's org / agency schema with
348
+ * {@link withOrgTypeFields} — it adds the fields AND re-applies the two-step
349
+ * rule in one call. The raw `orgTypeFieldsShape` is still exported for a
350
+ * consumer that must build its own object, but `.extend(orgTypeFieldsShape)`
351
+ * without `.refine(vspTwoStepHolds, VSP_TWO_STEP_ISSUE)` silently drops the
352
+ * rule (review nit — the extend-without-refine footgun); prefer the helper.
353
+ * The Mongoose mount enforces the same rule on save and update regardless,
354
+ * so a forgotten refine is caught at the database, not persisted.
355
+ * (ORG-TYPE-REVIEW-ROUND-2026-10-08)
356
+ *
357
+ * Naming: `OrgTypeSelectableKey*` means a SELECTABLE leaf (what may be set);
358
+ * `AgencyTypeKey*` means a STORABLE value (a leaf or `unknown`). The
359
+ * constants module's `OrgTypeKey` is wider than both — heading OR leaf — and
360
+ * is never a write type.
361
+ */
362
+
363
+ /** An org type the Admin Hub may SET: a selectable CVC-48 org-type leaf. */
364
+ declare const OrgTypeSelectableKeySchema: z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization"]>;
365
+ /** An org type an agency may be STORED with: a selectable leaf or `unknown`. */
366
+ declare const AgencyTypeKeySchema: z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>;
367
+ /**
368
+ * The organization-type fields on an agency, as a WRITE shape. All optional,
369
+ * so an agency payload without them validates unchanged; when present each
370
+ * must be well-formed (`type` a storable key, the booleans booleans).
371
+ */
372
+ declare const orgTypeFieldsShape: {
373
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
374
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
375
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
376
+ };
377
+ declare const AgencyOrgTypeFieldsSchema: z.ZodEffects<z.ZodObject<{
378
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
379
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
380
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
383
+ vspPrivateNonprofit?: boolean | undefined;
384
+ vsp?: boolean | undefined;
385
+ }, {
386
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
387
+ vspPrivateNonprofit?: boolean | undefined;
388
+ vsp?: boolean | undefined;
389
+ }>, {
390
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
391
+ vspPrivateNonprofit?: boolean | undefined;
392
+ vsp?: boolean | undefined;
393
+ }, {
394
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
395
+ vspPrivateNonprofit?: boolean | undefined;
396
+ vsp?: boolean | undefined;
397
+ }>;
398
+ /**
399
+ * A consumer's own org / agency write shape PLUS the organization-type
400
+ * fields, with the two-step rule applied — the one call that cannot forget
401
+ * the refine. `withOrgTypeFields({ name: z.string() })` ≡
402
+ * `z.object({ name, ...orgTypeFieldsShape }).refine(vspTwoStepHolds, …)`.
403
+ */
404
+ declare function withOrgTypeFields<T extends z.ZodRawShape>(shape: T): z.ZodEffects<z.ZodObject<T & {
405
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
406
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
407
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
408
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T & {
409
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
410
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
411
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
412
+ }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T & {
413
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
414
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
415
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
416
+ }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T & {
417
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
418
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
419
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
420
+ }>, any> extends infer T_3 ? { [k in keyof T_3]: T_3[k]; } : never, z.baseObjectInputType<T & {
421
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
422
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
423
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
424
+ }> extends infer T_4 ? { [k_1 in keyof T_4]: T_4[k_1]; } : never>;
425
+ /** The same WRITE shape, named for its home: the Org registry row. */
426
+ declare const OrgTypeFieldsSchema: z.ZodEffects<z.ZodObject<{
427
+ readonly type: z.ZodOptional<z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization", "own_agency_internal", "unknown"]>>;
428
+ readonly vsp: z.ZodOptional<z.ZodBoolean>;
429
+ readonly vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
430
+ }, "strip", z.ZodTypeAny, {
431
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
432
+ vspPrivateNonprofit?: boolean | undefined;
433
+ vsp?: boolean | undefined;
434
+ }, {
435
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
436
+ vspPrivateNonprofit?: boolean | undefined;
437
+ vsp?: boolean | undefined;
438
+ }>, {
439
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
440
+ vspPrivateNonprofit?: boolean | undefined;
441
+ vsp?: boolean | undefined;
442
+ }, {
443
+ type?: "unknown" | "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "own_agency_internal" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider" | undefined;
444
+ vspPrivateNonprofit?: boolean | undefined;
445
+ vsp?: boolean | undefined;
446
+ }>;
447
+ /**
448
+ * What the Admin Hub writes when it sets an organization's type: the type
449
+ * itself (required; a selectable leaf — never `unknown`, never a heading),
450
+ * with the two attested answers. `vsp` and `vspPrivateNonprofit` are
451
+ * privileged writes (the sender's `vsp` decides the release check), so the
452
+ * shape is `.strict()`: an unexpected key is rejected rather than ignored.
453
+ * `requires_roi` is NOT written through this shape — it is not one of the
454
+ * organization-type fields (informational, GDR § 5.17; parked Q-O5).
455
+ */
456
+ declare const SetOrgTypeInputSchema: z.ZodEffects<z.ZodObject<{
457
+ type: z.ZodEnum<["outreach_project", "temporary_shelter", "residential_project", "national_hotline", "local_other_hotline", "hotline", "child_welfare_cps", "juvenile_justice", "law_enforcement", "local_law_enforcement", "state_law_enforcement", "federal_law_enforcement", "tribal_law_enforcement", "other_law_enforcement", "courts_prosecution", "correction_probation", "adult_protective_services", "inpatient_psychiatric_facility", "healthcare_provider", "school_academic_institution", "child_advocacy_center", "victim_service_provider", "community_based_service_provider", "legal_services_provider", "mdt", "coalition", "employer", "benefits_public_assistance_office", "other_organization"]>;
458
+ vsp: z.ZodOptional<z.ZodBoolean>;
459
+ vspPrivateNonprofit: z.ZodOptional<z.ZodBoolean>;
460
+ }, "strict", z.ZodTypeAny, {
461
+ type: "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider";
462
+ vspPrivateNonprofit?: boolean | undefined;
463
+ vsp?: boolean | undefined;
464
+ }, {
465
+ type: "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider";
466
+ vspPrivateNonprofit?: boolean | undefined;
467
+ vsp?: boolean | undefined;
468
+ }>, {
469
+ type: "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider";
470
+ vspPrivateNonprofit?: boolean | undefined;
471
+ vsp?: boolean | undefined;
472
+ }, {
473
+ type: "outreach_project" | "temporary_shelter" | "residential_project" | "national_hotline" | "local_other_hotline" | "child_welfare_cps" | "juvenile_justice" | "law_enforcement" | "local_law_enforcement" | "state_law_enforcement" | "federal_law_enforcement" | "tribal_law_enforcement" | "other_law_enforcement" | "courts_prosecution" | "correction_probation" | "inpatient_psychiatric_facility" | "healthcare_provider" | "child_advocacy_center" | "victim_service_provider" | "community_based_service_provider" | "mdt" | "coalition" | "employer" | "benefits_public_assistance_office" | "other_organization" | "hotline" | "adult_protective_services" | "school_academic_institution" | "legal_services_provider";
474
+ vspPrivateNonprofit?: boolean | undefined;
475
+ vsp?: boolean | undefined;
476
+ }>;
477
+ /** A selectable leaf, as the Zod schema infers it (= {@link OrgTypeSelectableKey}). */
478
+ type OrgTypeSelectableKeyInput = OrgTypeSelectableKey;
479
+ /** A storable agency type, as the Zod schema infers it (= {@link AgencyTypeKey}). */
480
+ type AgencyTypeKeyInput = AgencyTypeKey;
481
+ type AgencyOrgTypeFieldsInput = z.infer<typeof AgencyOrgTypeFieldsSchema>;
482
+ type SetOrgTypeInput = z.infer<typeof SetOrgTypeInputSchema>;
483
+
484
+ export { type AgencyOrgTypeFieldsInput as A, type CvcCode as C, OrgTypeFieldsSchema as O, type PrimaryLanguageEntry as P, type ServiceCategoryEntry as S, type TeamApp as T, AgencyOrgTypeFieldsSchema as a, type AgencyTypeKeyInput as b, AgencyTypeKeySchema as c, CvcCodeSchema as d, type CvcDomain as e, CvcEntrySchema as f, type CvcEnvelope as g, CvcEnvelopeSchema as h, type CvcKey as i, CvcKeySchema as j, type OrgTypeSelectableKeyInput as k, OrgTypeSelectableKeySchema as l, ServiceCategoryEntrySchema as m, type SetOrgTypeInput as n, SetOrgTypeInputSchema as o, TeamAppSchema as p, type TeamDirectoryFieldsInput as q, TeamDirectoryFieldsSchema as r, orgTypeFieldsShape as s, type CvcEntry as t, type CvcValidationError as u, PrimaryLanguageEntrySchema as v, withOrgTypeFields as w, getCvcLevel as x, validateCvc as y };