@htilabs/platform-common-models 0.5.2-beta.3 → 0.5.3-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cvcEntry-wqktWfzE.d.cts → cvcEntry-BCj1OWqL.d.cts} +8 -8
- package/dist/{cvcEntry-wqktWfzE.d.ts → cvcEntry-BCj1OWqL.d.ts} +8 -8
- package/dist/cvcs/index.cjs +2120 -0
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +2368 -56
- package/dist/cvcs/index.d.ts +2368 -56
- package/dist/cvcs/index.js +2119 -0
- package/dist/cvcs/index.js.map +1 -1
- package/dist/{index--NCIPluF.d.cts → index-CoVr1jIV.d.cts} +1 -1
- package/dist/{index-CFOrHA8l.d.ts → index-I-DiX9eQ.d.ts} +1 -1
- package/dist/index.cjs +2319 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +203 -4
- package/dist/index.d.ts +203 -4
- package/dist/index.js +2317 -0
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/validation/index.cjs +6 -0
- package/dist/validation/index.cjs.map +1 -1
- package/dist/validation/index.d.cts +47 -1
- package/dist/validation/index.d.ts +47 -1
- package/dist/validation/index.js +5 -0
- package/dist/validation/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/cvc-sot.snap +4 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +8 -0
- package/src/__tests__/cvc-structural.test.ts +14 -0
- package/src/cvcs/index.ts +2 -0
- package/src/cvcs/primaryLanguage.v1.0.0.json +2116 -0
- package/src/generated/cvc-enums.ts +201 -0
- package/src/validation/cvc.ts +17 -0
|
@@ -284,3 +284,204 @@ export const RaceEthnicityKeys = {
|
|
|
284
284
|
} as const;
|
|
285
285
|
|
|
286
286
|
export type RaceEthnicityKey = keyof typeof RaceEthnicityKeys;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Key → positional code map for the `primary_language` CVC domain.
|
|
290
|
+
*
|
|
291
|
+
* Domain: `primary_language` · Version: 1.0.0 · Entries: 191
|
|
292
|
+
*/
|
|
293
|
+
export const PrimaryLanguageKeys = {
|
|
294
|
+
missingness_root: "122-000-000-000-000-000-000",
|
|
295
|
+
unknown: "122-000-000-000-000-000-001",
|
|
296
|
+
anonymous: "122-000-000-000-000-000-002",
|
|
297
|
+
data_not_collected: "122-000-000-000-000-000-003",
|
|
298
|
+
abkhazian: "122-001-000-000-000-000-000",
|
|
299
|
+
afar: "122-002-000-000-000-000-000",
|
|
300
|
+
afrikaans: "122-003-000-000-000-000-000",
|
|
301
|
+
akan: "122-004-000-000-000-000-000",
|
|
302
|
+
albanian: "122-005-000-000-000-000-000",
|
|
303
|
+
american_sign_language: "122-006-000-000-000-000-000",
|
|
304
|
+
amharic: "122-007-000-000-000-000-000",
|
|
305
|
+
arabic: "122-008-000-000-000-000-000",
|
|
306
|
+
aragonese: "122-009-000-000-000-000-000",
|
|
307
|
+
armenian: "122-010-000-000-000-000-000",
|
|
308
|
+
assamese: "122-011-000-000-000-000-000",
|
|
309
|
+
avaric: "122-012-000-000-000-000-000",
|
|
310
|
+
avestan: "122-013-000-000-000-000-000",
|
|
311
|
+
aymara: "122-014-000-000-000-000-000",
|
|
312
|
+
azerbaijani: "122-015-000-000-000-000-000",
|
|
313
|
+
bambara: "122-016-000-000-000-000-000",
|
|
314
|
+
bashkir: "122-017-000-000-000-000-000",
|
|
315
|
+
basque: "122-018-000-000-000-000-000",
|
|
316
|
+
belarusian: "122-019-000-000-000-000-000",
|
|
317
|
+
bengali: "122-020-000-000-000-000-000",
|
|
318
|
+
bislama: "122-021-000-000-000-000-000",
|
|
319
|
+
bosnian: "122-022-000-000-000-000-000",
|
|
320
|
+
breton: "122-023-000-000-000-000-000",
|
|
321
|
+
bulgarian: "122-024-000-000-000-000-000",
|
|
322
|
+
burmese: "122-025-000-000-000-000-000",
|
|
323
|
+
catalan_valencian: "122-026-000-000-000-000-000",
|
|
324
|
+
central_khmer: "122-027-000-000-000-000-000",
|
|
325
|
+
chamorro: "122-028-000-000-000-000-000",
|
|
326
|
+
chechen: "122-029-000-000-000-000-000",
|
|
327
|
+
chichewa_chewa_nyanja: "122-030-000-000-000-000-000",
|
|
328
|
+
chinese: "122-031-000-000-000-000-000",
|
|
329
|
+
chinese_cantonese: "122-032-000-000-000-000-000",
|
|
330
|
+
chinese_mandarin: "122-033-000-000-000-000-000",
|
|
331
|
+
church_slavic_old_slavonic_church_slavonic_old_bulgarian_old_church_slavonic: "122-034-000-000-000-000-000",
|
|
332
|
+
chuvash: "122-035-000-000-000-000-000",
|
|
333
|
+
cornish: "122-036-000-000-000-000-000",
|
|
334
|
+
corsican: "122-037-000-000-000-000-000",
|
|
335
|
+
cree: "122-038-000-000-000-000-000",
|
|
336
|
+
croatian: "122-039-000-000-000-000-000",
|
|
337
|
+
czech: "122-040-000-000-000-000-000",
|
|
338
|
+
danish: "122-041-000-000-000-000-000",
|
|
339
|
+
divehi_dhivehi_maldivian: "122-042-000-000-000-000-000",
|
|
340
|
+
dutch_flemish: "122-043-000-000-000-000-000",
|
|
341
|
+
dzongkha: "122-044-000-000-000-000-000",
|
|
342
|
+
english: "122-045-000-000-000-000-000",
|
|
343
|
+
esperanto: "122-046-000-000-000-000-000",
|
|
344
|
+
estonian: "122-047-000-000-000-000-000",
|
|
345
|
+
ewe: "122-048-000-000-000-000-000",
|
|
346
|
+
faroese: "122-049-000-000-000-000-000",
|
|
347
|
+
fijian: "122-050-000-000-000-000-000",
|
|
348
|
+
finnish: "122-051-000-000-000-000-000",
|
|
349
|
+
french: "122-052-000-000-000-000-000",
|
|
350
|
+
fulah: "122-053-000-000-000-000-000",
|
|
351
|
+
gaelic_scottish_gaelic: "122-054-000-000-000-000-000",
|
|
352
|
+
galician: "122-055-000-000-000-000-000",
|
|
353
|
+
ganda: "122-056-000-000-000-000-000",
|
|
354
|
+
georgian: "122-057-000-000-000-000-000",
|
|
355
|
+
german: "122-058-000-000-000-000-000",
|
|
356
|
+
guarani: "122-059-000-000-000-000-000",
|
|
357
|
+
gujarati: "122-060-000-000-000-000-000",
|
|
358
|
+
haitian_haitian_creole: "122-061-000-000-000-000-000",
|
|
359
|
+
hausa: "122-062-000-000-000-000-000",
|
|
360
|
+
hebrew: "122-063-000-000-000-000-000",
|
|
361
|
+
herero: "122-064-000-000-000-000-000",
|
|
362
|
+
hindi: "122-065-000-000-000-000-000",
|
|
363
|
+
hiri_motu: "122-066-000-000-000-000-000",
|
|
364
|
+
hungarian: "122-067-000-000-000-000-000",
|
|
365
|
+
icelandic: "122-068-000-000-000-000-000",
|
|
366
|
+
ido: "122-069-000-000-000-000-000",
|
|
367
|
+
igbo: "122-070-000-000-000-000-000",
|
|
368
|
+
indonesian: "122-071-000-000-000-000-000",
|
|
369
|
+
interlingua: "122-072-000-000-000-000-000",
|
|
370
|
+
interlingue_occidental: "122-073-000-000-000-000-000",
|
|
371
|
+
inuktitut: "122-074-000-000-000-000-000",
|
|
372
|
+
inupiaq: "122-075-000-000-000-000-000",
|
|
373
|
+
irish: "122-076-000-000-000-000-000",
|
|
374
|
+
italian: "122-077-000-000-000-000-000",
|
|
375
|
+
japanese: "122-078-000-000-000-000-000",
|
|
376
|
+
javanese: "122-079-000-000-000-000-000",
|
|
377
|
+
kalaallisut_greenlandic: "122-080-000-000-000-000-000",
|
|
378
|
+
kannada: "122-081-000-000-000-000-000",
|
|
379
|
+
kanuri: "122-082-000-000-000-000-000",
|
|
380
|
+
kashmiri: "122-083-000-000-000-000-000",
|
|
381
|
+
kazakh: "122-084-000-000-000-000-000",
|
|
382
|
+
kikuyu_gikuyu: "122-085-000-000-000-000-000",
|
|
383
|
+
kinyarwanda: "122-086-000-000-000-000-000",
|
|
384
|
+
kirghiz_kyrgyz: "122-087-000-000-000-000-000",
|
|
385
|
+
komi: "122-088-000-000-000-000-000",
|
|
386
|
+
kongo: "122-089-000-000-000-000-000",
|
|
387
|
+
korean: "122-090-000-000-000-000-000",
|
|
388
|
+
kuanyama_kwanyama: "122-091-000-000-000-000-000",
|
|
389
|
+
kurdish: "122-092-000-000-000-000-000",
|
|
390
|
+
lao: "122-093-000-000-000-000-000",
|
|
391
|
+
latin: "122-094-000-000-000-000-000",
|
|
392
|
+
latvian: "122-095-000-000-000-000-000",
|
|
393
|
+
limburgan_limburger_limburgish: "122-096-000-000-000-000-000",
|
|
394
|
+
lingala: "122-097-000-000-000-000-000",
|
|
395
|
+
lithuanian: "122-098-000-000-000-000-000",
|
|
396
|
+
luba_katanga: "122-099-000-000-000-000-000",
|
|
397
|
+
luxembourgish_letzeburgesch: "122-100-000-000-000-000-000",
|
|
398
|
+
macedonian: "122-101-000-000-000-000-000",
|
|
399
|
+
malagasy: "122-102-000-000-000-000-000",
|
|
400
|
+
malay: "122-103-000-000-000-000-000",
|
|
401
|
+
malayalam: "122-104-000-000-000-000-000",
|
|
402
|
+
maltese: "122-105-000-000-000-000-000",
|
|
403
|
+
manx: "122-106-000-000-000-000-000",
|
|
404
|
+
maori: "122-107-000-000-000-000-000",
|
|
405
|
+
marathi: "122-108-000-000-000-000-000",
|
|
406
|
+
marshallese: "122-109-000-000-000-000-000",
|
|
407
|
+
modern_greek: "122-110-000-000-000-000-000",
|
|
408
|
+
mongolian: "122-111-000-000-000-000-000",
|
|
409
|
+
nauru: "122-112-000-000-000-000-000",
|
|
410
|
+
navajo_navaho: "122-113-000-000-000-000-000",
|
|
411
|
+
ndonga: "122-114-000-000-000-000-000",
|
|
412
|
+
nepali: "122-115-000-000-000-000-000",
|
|
413
|
+
north_ndebele: "122-116-000-000-000-000-000",
|
|
414
|
+
northern_sami: "122-117-000-000-000-000-000",
|
|
415
|
+
norwegian: "122-118-000-000-000-000-000",
|
|
416
|
+
norwegian_bokmal: "122-119-000-000-000-000-000",
|
|
417
|
+
norwegian_nynorsk: "122-120-000-000-000-000-000",
|
|
418
|
+
occitan: "122-121-000-000-000-000-000",
|
|
419
|
+
ojibwa: "122-122-000-000-000-000-000",
|
|
420
|
+
oriya: "122-123-000-000-000-000-000",
|
|
421
|
+
oromo: "122-124-000-000-000-000-000",
|
|
422
|
+
ossetian_ossetic: "122-125-000-000-000-000-000",
|
|
423
|
+
other_language: "122-126-000-000-000-000-000",
|
|
424
|
+
pali: "122-127-000-000-000-000-000",
|
|
425
|
+
panjabi_punjabi: "122-128-000-000-000-000-000",
|
|
426
|
+
persian: "122-129-000-000-000-000-000",
|
|
427
|
+
polish: "122-130-000-000-000-000-000",
|
|
428
|
+
portuguese: "122-131-000-000-000-000-000",
|
|
429
|
+
pushto_pashto: "122-132-000-000-000-000-000",
|
|
430
|
+
quechua: "122-133-000-000-000-000-000",
|
|
431
|
+
romanian_moldavian_moldovan: "122-134-000-000-000-000-000",
|
|
432
|
+
romansh: "122-135-000-000-000-000-000",
|
|
433
|
+
rundi: "122-136-000-000-000-000-000",
|
|
434
|
+
russian: "122-137-000-000-000-000-000",
|
|
435
|
+
samoan: "122-138-000-000-000-000-000",
|
|
436
|
+
sango: "122-139-000-000-000-000-000",
|
|
437
|
+
sanskrit: "122-140-000-000-000-000-000",
|
|
438
|
+
sardinian: "122-141-000-000-000-000-000",
|
|
439
|
+
serbian: "122-142-000-000-000-000-000",
|
|
440
|
+
shona: "122-143-000-000-000-000-000",
|
|
441
|
+
sichuan_yi_nuosu: "122-144-000-000-000-000-000",
|
|
442
|
+
sindhi: "122-145-000-000-000-000-000",
|
|
443
|
+
sinhala_sinhalese: "122-146-000-000-000-000-000",
|
|
444
|
+
slovak: "122-147-000-000-000-000-000",
|
|
445
|
+
slovenian: "122-148-000-000-000-000-000",
|
|
446
|
+
somali: "122-149-000-000-000-000-000",
|
|
447
|
+
sotho_southern: "122-150-000-000-000-000-000",
|
|
448
|
+
south_ndebele: "122-151-000-000-000-000-000",
|
|
449
|
+
spanish: "122-152-000-000-000-000-000",
|
|
450
|
+
sundanese: "122-153-000-000-000-000-000",
|
|
451
|
+
swahili: "122-154-000-000-000-000-000",
|
|
452
|
+
swati: "122-155-000-000-000-000-000",
|
|
453
|
+
swedish: "122-156-000-000-000-000-000",
|
|
454
|
+
tagalog: "122-157-000-000-000-000-000",
|
|
455
|
+
tahitian: "122-158-000-000-000-000-000",
|
|
456
|
+
tajik: "122-159-000-000-000-000-000",
|
|
457
|
+
tamil: "122-160-000-000-000-000-000",
|
|
458
|
+
tatar: "122-161-000-000-000-000-000",
|
|
459
|
+
telugu: "122-162-000-000-000-000-000",
|
|
460
|
+
thai: "122-163-000-000-000-000-000",
|
|
461
|
+
tibetan: "122-164-000-000-000-000-000",
|
|
462
|
+
tigrinya: "122-165-000-000-000-000-000",
|
|
463
|
+
tonga: "122-166-000-000-000-000-000",
|
|
464
|
+
tsonga: "122-167-000-000-000-000-000",
|
|
465
|
+
tswana: "122-168-000-000-000-000-000",
|
|
466
|
+
turkish: "122-169-000-000-000-000-000",
|
|
467
|
+
turkmen: "122-170-000-000-000-000-000",
|
|
468
|
+
twi: "122-171-000-000-000-000-000",
|
|
469
|
+
uighur_uyghur: "122-172-000-000-000-000-000",
|
|
470
|
+
ukrainian: "122-173-000-000-000-000-000",
|
|
471
|
+
urdu: "122-174-000-000-000-000-000",
|
|
472
|
+
uzbek: "122-175-000-000-000-000-000",
|
|
473
|
+
venda: "122-176-000-000-000-000-000",
|
|
474
|
+
vietnamese: "122-177-000-000-000-000-000",
|
|
475
|
+
volapuk: "122-178-000-000-000-000-000",
|
|
476
|
+
walloon: "122-179-000-000-000-000-000",
|
|
477
|
+
welsh: "122-180-000-000-000-000-000",
|
|
478
|
+
western_frisian: "122-181-000-000-000-000-000",
|
|
479
|
+
wolof: "122-182-000-000-000-000-000",
|
|
480
|
+
xhosa: "122-183-000-000-000-000-000",
|
|
481
|
+
yiddish: "122-184-000-000-000-000-000",
|
|
482
|
+
yoruba: "122-185-000-000-000-000-000",
|
|
483
|
+
zhuang_chuang: "122-186-000-000-000-000-000",
|
|
484
|
+
zulu: "122-187-000-000-000-000-000",
|
|
485
|
+
} as const;
|
|
486
|
+
|
|
487
|
+
export type PrimaryLanguageKey = keyof typeof PrimaryLanguageKeys;
|
package/src/validation/cvc.ts
CHANGED
|
@@ -80,6 +80,22 @@ export const ServiceCategoryEntrySchema = CvcEntrySchema.extend({
|
|
|
80
80
|
relevantMechanisms: z.array(CvcKeySchema).nullable(),
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Primary-language-specific entry. Adds:
|
|
85
|
+
* - `iso6391Code` — the ISO 639-1 alpha-2 code for the language, or `null`
|
|
86
|
+
* for entries without an ISO 639-1 code (missingness entries, Chinese
|
|
87
|
+
* varieties Mandarin/Cantonese, `other_language`). ASL is stored as
|
|
88
|
+
* `"ase"` (ISO 639-3) per Notion's convention; the CVC header documents
|
|
89
|
+
* this caveat.
|
|
90
|
+
* - `priority` — `true` for front-end short-list entries (14 total in
|
|
91
|
+
* CVC-122: 13 L1 languages plus the canonical `unknown` missingness
|
|
92
|
+
* entry). See locked spec §9.2.
|
|
93
|
+
*/
|
|
94
|
+
export const PrimaryLanguageEntrySchema = CvcEntrySchema.extend({
|
|
95
|
+
iso6391Code: z.string().nullable(),
|
|
96
|
+
priority: z.boolean(),
|
|
97
|
+
});
|
|
98
|
+
|
|
83
99
|
// ─── Envelope schema ─────────────────────────────────────────────────────────
|
|
84
100
|
|
|
85
101
|
/**
|
|
@@ -104,6 +120,7 @@ export type CvcCode = z.infer<typeof CvcCodeSchema>;
|
|
|
104
120
|
export type CvcKey = z.infer<typeof CvcKeySchema>;
|
|
105
121
|
export type CvcEntry = z.infer<typeof CvcEntrySchema>;
|
|
106
122
|
export type ServiceCategoryEntry = z.infer<typeof ServiceCategoryEntrySchema>;
|
|
123
|
+
export type PrimaryLanguageEntry = z.infer<typeof PrimaryLanguageEntrySchema>;
|
|
107
124
|
export type CvcEnvelope = z.infer<typeof CvcEnvelopeSchema>;
|
|
108
125
|
|
|
109
126
|
/**
|